Skip to content
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

[wasm][debugger] Debug on Node.js #68807

Merged
merged 8 commits into from
Aug 11, 2022
Merged

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented May 3, 2022

Done in this PR:
Fix startup to debug nodejs.

To debug the sample:
Build sample console-node:
dotnet build /p:TargetArchitecture=wasm /p:TargetOS=Browser /p:Configuration=Debug

Run the sample listening on port 9222:
make debug-console-node

run BrowserDebugHost

Open chrome/vscode and choose the address printed on BrowserDebugHost console.

You will see the nodejs process running, you can attach.

You also need to add the folder with the source files on IDE(chrome/vscode), then you can add breakpoints.

TODO:

  • add node configuration to run debugger-tests

@ghost
Copy link

ghost commented May 3, 2022

Tagging subscribers to this area: @thaystg
See info in area-owners.md if you want to be subscribed.

Issue Details

Fix startup to debug nodejs.

Build sample console-node-cjs

make run-console-node-debug

run BrowserDebugHost

Open chrome/vscode and choose the address printed on BrowserDebugHost console.

You will see the nodejs process running, you can attach.

Author: thaystg
Assignees: thaystg
Labels:

area-Debugger-mono

Milestone: -

@lewing
Copy link
Member

lewing commented May 26, 2022

the app host changes are in now, what is the state of this?

@ghost ghost closed this Jun 26, 2022
@ghost
Copy link

ghost commented Jun 26, 2022

Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it.

@thaystg thaystg reopened this Jun 27, 2022
@pavelsavara
Copy link
Member

pavelsavara commented Jul 22, 2022

also add --inspect=9222 here

<Exec WorkingDirectory="bin/$(Configuration)/AppBundle" Command="node --expose_wasm $(_WasmMainJSFileName) -- $(DOTNET_MONO_LOG_LEVEL) --run $(_SampleAssembly) $(Args)" IgnoreExitCode="true" />

@thaystg thaystg marked this pull request as ready for review July 27, 2022 13:41
@radical
Copy link
Member

radical commented Jul 27, 2022

This needs to be integrated with src/mono/wasm/host/JSEngineHost.cs also. BrowserHost has an implementation of this, which can be used as an example. Not blocking for this PR though.

@radical radical added the arch-wasm WebAssembly architecture label Jul 28, 2022
@ghost
Copy link

ghost commented Jul 28, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Done in this PR:
Fix startup to debug nodejs.

To debug the sample:
Build sample console-node-cjs:
dotnet build /p:TargetArchitecture=wasm /p:TargetOS=Browser /p:Configuration=Debug

Run the sample listening on port 9222:
make debug-console-node

run BrowserDebugHost

Open chrome/vscode and choose the address printed on BrowserDebugHost console.

You will see the nodejs process running, you can attach.

You also need to add the folder with the source files on IDE(chrome/vscode), then you can add breakpoints.

TODO:

  • add node configuration to run debugger-tests
Author: thaystg
Assignees: thaystg
Labels:

arch-wasm, area-Debugger-mono

Milestone: -

@radical radical added this to the 7.0.0 milestone Jul 28, 2022
@radical
Copy link
Member

radical commented Aug 11, 2022

Wasm failure is known, and unrelated.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Debugger-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants