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

debugger disconnect on embed mono #74

Open
johnson3d opened this issue Jan 28, 2021 · 0 comments
Open

debugger disconnect on embed mono #74

johnson3d opened this issue Jan 28, 2021 · 0 comments

Comments

@johnson3d
Copy link

johnson3d commented Jan 28, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant