Support Debugging in Mono scripting
See original GitHub issueI wanted to start a recorded discussion here of what it might take to support debugging when running under Mono via mono’s remote debugger. The main use case I am interested in is being able to debug through VS-Code’s Mono Debugger extension.
So far I think I have the pieces to make this happen from VS-Code, but we’re obviously still missing support in Cake’s implementation that uses the mono script host.
Here’s the piece for VS-Code that I think should mostly make it work once Cake supports it:
{
"version": "0.2.0",
"configurations": [
{
"name": "StartCake",
"type": "mono",
"request": "launch",
"program": "${workspaceRoot}/tools/Cake/Cake.exe",
"runtimeArgs": [
"--debug",
"--debugger-agent=transport=dt_socket,server=y,address=127.0.0.1:55556"
],
"args": [
"${workspaceRoot}/build.cake",
"--verbosity=diagnostic",
"--debug"
],
"cwd": "${workspaceRoot}",
"console":"internalConsole",
"noDebug": true
},
{
"name": "AttachCake",
"type": "mono",
"request": "attach",
"address": "localhost",
"port": 55556
}
],
"compounds": [
{
"name": "DebugCake",
"configurations": ["StartCake", "AttachCake"]
}
]
}
As for the Cake changes, I think first of all we need to take a look somewhere in here: https://github.com/cake-build/cake/blob/develop/src/Cake/Scripting/Mono/MonoScriptSession.cs#L54
Basically, this SO answer shows how to enable generating debug symbols in mono’s script host: http://stackoverflow.com/questions/875723/how-to-debug-break-in-codedom-compiled-code
What I’m not exactly clear on is how do we go from having debug symbols generated for the generated script, to resolving breakpoints from the original script before it was transformed…
@mholo65 any ideas? I see you implemented the original debugging on the Roslyn side…
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (10 by maintainers)
Top GitHub Comments
Yeah. I’ll open one in the vs-code repo to track getting mono debugging working there.
@Redth Can we close this issue?