microsoft / microsoft/vscode-mono-debug
debugger disconnect on embed mono
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 180
- Forks
- 182
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 1
Description
I embed mono by options:
const char* options[] = {
"--soft-breakpoints",
"--debugger-agent=transport=dt_socket,server=y,address=127.0.0.1:55555,timeout=9999999"
};
mono_jit_parse_options(sizeof(options) / sizeof(char*), (char**)options);
mono_debug_init(MONO_DEBUG_FORMAT_MONO);
mono debug can accept this socket ,but debug thread will get a disconnect event soon, then thread will exit:
res = transport_recv (header, HEADER_LENGTH);
/* This will break if the socket is closed during shutdown too */
if (res != HEADER_LENGTH) {
PRINT_DEBUG_MSG (1, "[dbg] transport_recv () returned %d, expected %d.\n", res, HEADER_LENGTH);
this is the launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "mono",
"request": "launch",
"program": "F:/TProject/Module/CSharpTestMono/bin/Debug/CSharpTestMono.exe",//"${workspaceRoot}/program.exe",
"cwd": "F:/TProject/Module/EmbedMono/x64/Debug"//"${workspaceRoot}"
},
{
"name": "Attach",
"type": "mono",
"request": "attach",
"address": "localhost",
"port": 55555,
},
]
}
I can debug by Launch,But Attach is not ok now.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Attach configuration in launch.json against the embedded Mono setup using port 55555. Inspect the debug thread around transport_recv and compare its behavior with the working Launch configuration; done means Attach stays connected and debugging can proceed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100