-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port pdb debugger to this repository #16
Conversation
"languages": [ | ||
"python" | ||
], | ||
"type": "python-pdb-node", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a debug config so I could just test with a launch.json instead of a command.
readonly context: vscode.ExtensionContext, | ||
private readonly _ral: RAL | ||
) { | ||
this._spawner = _ral.spawner.create(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debugger is using a 'Spawner' and 'Spawnee' abstraction. It needs only a few things from child_process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the WASI version is working, I hope this should be easy to implement there.
* @param args: arguments to pass to the python | ||
* @returns an object that can be listened to for stdout/stderr/stdin | ||
*/ | ||
spawn(args: string[], cwd: string | undefined): Promise<Spawnee>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think? you can pass args to a worker? If not a message could be created to pass the args to pdb inside the worker.
Yes, in node but not in the browser. In the browser you need to decode them as a param string. See https://github.com/microsoft/vscode-wasm/blob/74b49f8c2df9ecb807a934ba0de86f6fb1db5b92/sync-api-common/src/browser/ril.ts#L74 and https://github.com/microsoft/vscode-wasm/blob/74b49f8c2df9ecb807a934ba0de86f6fb1db5b92/sync-api-common/src/node/ril.ts#L74 |
The code looks fine to me. I would only like to ask for one thing: if methods are private we should prefix them with the private keyword in TS and not only rely on the underscore. We don't have a clear rule in VS Code but most of the devs (including me) don't prefix private members with I propose that I add you as a committer to the repository so that you can merge the PR when approved. |
Sure sounds good. |
Code got merge from another PR. Closing |
Moved the code I had in microsoft/vscode-wasm#27 to this repository instead.
@dbaeumer I didn't wire up the web version of the debugger, and the desktop version is not using a WASI, but figured that would happen later once you get the new file descriptor setup.