Skip to content

R language runtime emits a single \n (newline) when interrupted... #1238

@softwarenerd

Description

@softwarenerd

When you execute a long-running statement in R and then interrupt it via Ctrl-C (or escape), the onDidReceiveRuntimeMessageStream event is fired on the stderr stream with a \n (newline). This results in a blank line of error output in the console:

Image

This does not happen in RStudio:

I Ctrl-C'd this sleep in RStudio:

Image

Set a breakpoint here on addOrUpdateUpdateRuntimeItemActivity to see the output:

			} else if (languageRuntimeMessageStream.name === 'stderr') {
				this.addOrUpdateUpdateRuntimeItemActivity(
					languageRuntimeMessageStream.parent_id,
					new ActivityItemErrorStream(
						languageRuntimeMessageStream.id,
						languageRuntimeMessageStream.parent_id,
						new Date(languageRuntimeMessageStream.when),
						languageRuntimeMessageStream.text
					)
				);
			}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglang: r

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions