diff --git a/README.md b/README.md index 8764d15..8032c60 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,9 @@ ## Documentation -Full documentation on Installation, Configuration and supported functionality can be found at [the probe-rs webpage](https://probe.rs/docs/tools/vscode/) +Full documentation on Installation, Configuration and supported functionality can be found at [the probe-rs webpage](https://probe.rs/docs/tools/vscode/) and under the [visual tour heading](https://probe.rs/docs/tools/vscode/#a-visual-guide-of-implemented-features) -![probe-rs-debugger](images/probe-rs-debugger.gif) -Images above taken while using the [Micro Rust sample application](https://github.com/titanclass/microrust-start) +![](images/probe-rs-debugger.gif) ## Development Setup diff --git a/images/probe-rs-debugger.gif b/images/probe-rs-debugger.gif index e29584e..9ddee41 100644 Binary files a/images/probe-rs-debugger.gif and b/images/probe-rs-debugger.gif differ diff --git a/package.json b/package.json index 9fa8625..0d2e6b5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "probe-rs-debugger", "displayName": "Debugger for probe-rs", - "version": "0.3.4", + "version": "0.3.5", "publisher": "probe-rs", "description": "probe-rs Debug Adapter for VS Code.", "author": { @@ -45,21 +45,21 @@ }, "enabledApiProposals": [], "dependencies": { - "@vscode/debugadapter": "^1.53.0", + "@vscode/debugadapter": "^1.54.0", "await-notify": "1.0.1", "portfinder": "^1.0.28" }, "devDependencies": { "@types/glob": "^7.2.0", "@types/mocha": "^9.1.0", - "@types/node": "^17.0.18", + "@types/node": "^17.0.21", "@types/vscode": "^1.64.0", - "@typescript-eslint/eslint-plugin": "^5.12.0", - "@typescript-eslint/parser": "^5.12.0", - "@vscode/debugprotocol": "^1.53.0", - "eslint": "^8.9.0", + "@typescript-eslint/eslint-plugin": "^5.13.0", + "@typescript-eslint/parser": "^5.13.0", + "@vscode/debugprotocol": "^1.54.0", + "eslint": "^8.10.0", "glob": "^7.2.0", - "mocha": "^9.2.0", + "mocha": "^9.2.1", "portfinder": "^1.0.28", "ts-loader": "^9.2.6", "typescript": "^4.5.5", @@ -372,4 +372,4 @@ } ] } -} +} \ No newline at end of file diff --git a/src/debugProtocol.json b/src/debugProtocol.json index 90a36a0..e331ac6 100644 --- a/src/debugProtocol.json +++ b/src/debugProtocol.json @@ -3573,6 +3573,10 @@ "description": "Visibility of variable. Before introducing additional values, try to use the listed values.", "type": "string", "_enum": [ "public", "private", "protected", "internal", "final" ] + }, + "lazy": { + "description": "If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation.\nThis mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function.\nPlease note that in addition to the 'lazy' flag, the variable's 'variablesReference' must refer to a variable that will provide the value through another 'variable' request.", + "type": "boolean" } } }, diff --git a/src/extension.ts b/src/extension.ts index c77e8e6..bece896 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -127,9 +127,8 @@ class ProbeRSDebugAdapterServerDescriptorFactory implements vscode.DebugAdapterD channelTerminalConfig = channelTerminal.creationOptions as vscode.ExtensionTerminalOptions; let windowIsOpen = true; session.customRequest("rtt_window_opened", { channelNumber, windowIsOpen }).then((response) => { - logToConsole("DEBUG: probe-rs: RTT Window opened, and ready to receive RTT data on channel" + JSON.stringify(channelNumber, null, 2)); + logToConsole("DEBUG: probe-rs: RTT Window reused, and ready to receive RTT data on channel" + JSON.stringify(channelNumber, null, 2)); }); - vscode.debug.activeDebugConsole.appendLine("probe-rs-debugger: Will reuse existing RTT Terminal window named: " + channelName); break; } } @@ -149,7 +148,9 @@ class ProbeRSDebugAdapterServerDescriptorFactory implements vscode.DebugAdapterD vscode.debug.activeDebugConsole.appendLine("probe-rs-debugger: Opened a new RTT Terminal window named: " + channelName); this.rttTerminals.push([+channelNumber, dataFormat, channelTerminal, channelWriteEmitter]); } - channelTerminal.show(false); + if (channelNumber === 0) { + channelTerminal.show(false); + } } } } @@ -157,7 +158,6 @@ class ProbeRSDebugAdapterServerDescriptorFactory implements vscode.DebugAdapterD receivedCustomEvent(customEvent: vscode.DebugSessionCustomEvent) { switch (customEvent.event) { case 'probe-rs-rtt-channel-config': - console.log("will open RTT"); this.createRttTerminal(+customEvent.body?.channelNumber, customEvent.body?.dataFormat, customEvent.body?.channelName); break; case 'probe-rs-rtt-data': @@ -357,13 +357,13 @@ class ProbeRsDebugAdapterTracker implements DebugAdapterTracker { onWillReceiveMessage(message: any) { if (probeRsLogLevel === 'Debug' || probeRsLogLevel === 'Trace') { - logToConsole("DEBUG: Sending message to debug adapter:\n" + JSON.stringify(message, null, 2)); + logToConsole("DEBUG: Received message from debug adapter:\n" + JSON.stringify(message, null, 2)); } } onDidSendMessage(message: any) { if (probeRsLogLevel === 'Debug' || probeRsLogLevel === 'Trace') { - logToConsole("DEBUG: Received message from debug adapter:\n" + JSON.stringify(message, null, 2)); + logToConsole("DEBUG: Sending message to debug adapter:\n" + JSON.stringify(message, null, 2)); } }