Logging to the console from a plug-in may cause the cyclic messaging #18598
Labels
area/editor/theia
Issues related to the che-theia IDE of Che
kind/bug
Outline of a bug - must adhere to the bug report template.
lifecycle/frozen
Indicates that an issue or PR should not be auto-closed due to staleness.
severity/P2
Has a minor but important impact to the usage or development of the system.
Describe the bug
If a plug-in logs to the console from
vscode.TextDocumentChangeEvent
listener function it leads to the cyclic messaging.Investigation details.
When a plug-in writes to the console the messages are forwarded to Che-Theia output channel. Output channel widget's content is rendered with Monaco editor. That means every message sent to the console adds a content to a Monaco editor which fires it's
onDidChangeContent
event. This event is passed to the plug-in system.If a plug-in sets a listener with
vscode.workspace.onDidChangeTextDocument
Plug-in API and logs to the console from inside the listener function it causes the cyclic messaging. E.g.:Note, the issue isn't reproduced on upstream Theia.
Che version
Steps to reproduce
hosted-instance-log
output channel view (View->Output).Expected behavior
console.log
from inside avscode.workspace.onDidChangeTextDocument
listener function shouldn't cause firing Monaco'sonDidChangeContent
event.Runtime
kubectl version
)oc version
)minikube version
andkubectl version
)minishift version
andoc version
)docker version
andkubectl version
)Screenshots
Installation method
chectl version
commandEnvironment
Eclipse Che Logs
Additional context
The text was updated successfully, but these errors were encountered: