microsoft / vscode-mono-debug

A simple VS Code debug adapter for mono
Other
159 stars 173 forks source link

only attach successfully at first time #92

Open WeiRU087 opened 1 year ago

WeiRU087 commented 1 year ago

The first attach is ok, and the subsequent attempts can not hit any breakpoints.

It looks like all right as the buttons all act as attached as below shown, but the callstack in the left of vscode is empty. image image

Maybe the disconnet operation is not set correctly ?

federico-r-figueredo commented 1 year ago

I've exactly the same issue. Breakpoints 're only hit the first time I run the debugger.

WeiRU087 commented 1 year ago

I've exactly the same issue. Breakpoints 're only hit the first time I run the debugger.

Try adding

m_Session.Detach();
m_Session.Adaptor.Dispose();

after this line https://github.com/microsoft/vscode-mono-debug/blob/main/src/csharp/MonoDebugSession.cs#L447