Skip to content

Commit 27af865

Browse files
bors[bot]noppej
andauthored
Merge #30
30: Remove CLI mode from probe-rs-debugger r=Yatekii a=noppej There are two linked PR's that depend on each other: - [probe-rs/probe-rs](probe-rs/probe-rs#1041) - [probe-rs/vscode](#30) - A WIP release is available for testing at [probe-rs-debugger-0.3.6.vsix](https://github.com/probe-rs/vscode/releases/download/v0.3.6/probe-rs-debugger-0.3.6.vsix) Henceforth, the `probe-rs-debugger` command will only accept four CLI commands: ``` USAGE: probe-rs-debugger <SUBCOMMAND> OPTIONS: -h, --help Print help information -V, --version Print version information SUBCOMMANDS: debug Open target in debug mode and accept debug commands. This only works as a [protocol::DapAdapter] and uses DAP Protocol debug commands (enables connections from clients such as Microsoft Visual Studio Code) help Print this message or the help of the given subcommand(s) list List all connected debug probes list-chips List all probe-rs supported chips ``` Co-authored-by: JackN <[email protected]>
2 parents 1045555 + a7d9fa9 commit 27af865

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "probe-rs-debugger",
33
"displayName": "Debugger for probe-rs",
4-
"version": "0.3.5",
4+
"version": "0.3.6",
55
"publisher": "probe-rs",
66
"description": "probe-rs Debug Adapter for VS Code.",
77
"author": {
@@ -13,7 +13,7 @@
1313
"probe-rs embedded debug"
1414
],
1515
"engines": {
16-
"vscode": "^1.64.2"
16+
"vscode": "^1.65.0"
1717
},
1818
"icon": "images/probe-rs-debugger.png",
1919
"categories": [
@@ -53,18 +53,18 @@
5353
"@types/glob": "^7.2.0",
5454
"@types/mocha": "^9.1.0",
5555
"@types/node": "^17.0.21",
56-
"@types/vscode": "^1.64.0",
56+
"@types/vscode": "^1.65.0",
5757
"@typescript-eslint/eslint-plugin": "^5.13.0",
5858
"@typescript-eslint/parser": "^5.13.0",
5959
"@vscode/debugprotocol": "^1.54.0",
6060
"eslint": "^8.10.0",
6161
"glob": "^7.2.0",
6262
"mocha": "^9.2.1",
6363
"portfinder": "^1.0.28",
64-
"ts-loader": "^9.2.6",
65-
"typescript": "^4.5.5",
64+
"ts-loader": "^9.2.7",
65+
"typescript": "^4.6.2",
6666
"vsce": "^2.6.5",
67-
"webpack": "^5.69.1",
67+
"webpack": "^5.70.0",
6868
"webpack-cli": "^4.9.2"
6969
},
7070
"main": "./dist/ext/extension.js",
@@ -372,4 +372,4 @@
372372
}
373373
]
374374
}
375-
}
375+
}

src/extension.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ class ProbeRSDebugAdapterServerDescriptorFactory implements vscode.DebugAdapterD
108108
onDidWrite: channelWriteEmitter.event,
109109
open: () => {
110110
let windowIsOpen = true;
111-
session.customRequest("rtt_window_opened", { channelNumber, windowIsOpen }).then((response) => {
111+
session.customRequest("rttWindowOpened", { channelNumber, windowIsOpen }).then((response) => {
112112
logToConsole("DEBUG: probe-rs: RTT Window opened, and ready to receive RTT data on channel" + JSON.stringify(channelNumber, null, 2));
113113
});
114114
},
115115
close: () => {
116116
let windowIsOpen = false;
117-
session.customRequest("rtt_window_opened", { channelNumber, windowIsOpen }).then((response) => {
117+
session.customRequest("rttWindowOpened", { channelNumber, windowIsOpen }).then((response) => {
118118
logToConsole("DEBUG: probe-rs: RTT Window closed, and can no longer receive RTT data on channel" + JSON.stringify(channelNumber, null, 2));
119119
});
120120
},
@@ -126,7 +126,7 @@ class ProbeRSDebugAdapterServerDescriptorFactory implements vscode.DebugAdapterD
126126
channelTerminal = reuseTerminal;
127127
channelTerminalConfig = channelTerminal.creationOptions as vscode.ExtensionTerminalOptions;
128128
let windowIsOpen = true;
129-
session.customRequest("rtt_window_opened", { channelNumber, windowIsOpen }).then((response) => {
129+
session.customRequest("rttWindowOpened", { channelNumber, windowIsOpen }).then((response) => {
130130
logToConsole("DEBUG: probe-rs: RTT Window reused, and ready to receive RTT data on channel" + JSON.stringify(channelNumber, null, 2));
131131
});
132132
break;
@@ -165,7 +165,7 @@ class ProbeRSDebugAdapterServerDescriptorFactory implements vscode.DebugAdapterD
165165
for (var [channelNumber, dataFormat, , channelWriteEmitter] of this.rttTerminals) {
166166
if (channelNumber === incomingChannelNumber) {
167167
switch (dataFormat) {
168-
case 'BinaryLE': //Don't mess with this data
168+
case 'BinaryLE': //Don't mess with or filter this data
169169
channelWriteEmitter.fire(customEvent.body?.data);
170170
break;
171171
default: //Replace newline characters with platform appropriate newline/carriage-return combinations
@@ -242,7 +242,6 @@ class ProbeRSDebugAdapterServerDescriptorFactory implements vscode.DebugAdapterD
242242
} else {
243243
args = [
244244
'debug',
245-
'--dap'
246245
];
247246
}
248247
args.push("--port");

0 commit comments

Comments
 (0)