Giter Club home page Giter Club logo

Comments (9)

viewizard avatar viewizard commented on June 26, 2024

Please note, we don't support any IDE/Plugins/Adapters. Frankly speaking, I have no idea what files you provided and attached here.
Please, provide VScode protocol interaction log, so, we could analyze it (what commands with what parameters were sent and what were debugger responts).

from netcoredbg.

GniLudio avatar GniLudio commented on June 26, 2024

@viewizard This is the log:

Creating Process
Creating Debug Adapter Host
Initializing Debug Adapter Host
Host    SynchronousOperationBegin
Host    LogMessage      Trace
        --> C (initialize-1): {"type":"request","command":"initialize","arguments":{"pathFormat":"path","clientID":"Test","clientName":"Test","adapterID":"netcoredbg"},"seq":1}
Host    LogMessage      Trace
        <--   E (capabilities): {"body":{"capabilities":{"exceptionBreakpointFilters":[{"filter":"all","label":"all"},{"filter":"user-unhandled","label":"user-unhandled"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsExceptionFilterOptions":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":false,"supportsFunctionBreakpoints":true,"supportsSetExpression":true,"supportsSetVariable":true,"supportsTerminateRequest":true}},"event":"capabilities","seq":"1","type":"event"}
Host    SynchronousOperationUpdate
Host    EventReceived   capabilities
Host    LogMessage      Trace
        <--   E (initialized): {"body":{},"event":"initialized","seq":"2","type":"event"}
Host    EventReceived   initialized
Host    LogMessage      Trace
        <--   R (initialize-1) [371 ms]: {"body":{"exceptionBreakpointFilters":[{"filter":"all","label":"all"},{"filter":"user-unhandled","label":"user-unhandled"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsExceptionFilterOptions":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":false,"supportsFunctionBreakpoints":true,"supportsSetExpression":true,"supportsSetVariable":true,"supportsTerminateRequest":true},"command":"initialize","request_seq":1,"seq":"3","success":true,"type":"response"}
Host    RequestCompleted        initialize      1       00:00:00.3955975
Host    SynchronousOperationEnd
Launching Debugee
Host    SynchronousOperationBegin
Host    LogMessage      Trace
        --> C (launch-2): {"type":"request","command":"launch","arguments":{"program":"..\\..\\..\\..\\CSHelloWOrld\\bin\\Debug\\net8.0\\CSHelloWorld.dll","stopOnEntry":false},"seq":2}
Host    LogMessage      Trace
        <--   R (launch-2) [10 ms]: {"body":{},"command":"launch","request_seq":2,"seq":"4","success":true,"type":"response"}
Host    RequestCompleted        launch  2       00:00:00.0164539
Host    SynchronousOperationEnd

from netcoredbg.

GniLudio avatar GniLudio commented on June 26, 2024

@viewizard Added which files are included in the zip to the description.

from netcoredbg.

viewizard avatar viewizard commented on June 26, 2024

Just tested debugger with VSCode IDE and you example (CSHelloWorld) with breakpoint on line 5 and continue after stop at breakpoint - no issues:

        {
            "name": ".NET Core Launch with netcoredbg",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceFolder}/bin/Debug/net8.0/CSHelloWorld.dll",
            "args": [],
            "cwd": "${workspaceFolder}",
            "console": "integratedTerminal",
            "stopAtEntry": false,
            "internalConsoleOptions": "openOnSessionStart",
            "logging": {
                "engineLogging": true
            },
            "pipeTransport": {
                "pipeCwd": "${workspaceFolder}",
                "pipeProgram": "cmd",
                "pipeArgs": ["/c"],
                "debuggerPath": "C:/Users/user/Desktop/netcoredbg/netcoredbg.exe"
            }
        }
-> (C) {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"coreclr","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true},"type":"request","seq":1}
<- (E) {"body":{"capabilities":{"exceptionBreakpointFilters":[{"filter":"all","label":"all"},{"filter":"user-unhandled","label":"user-unhandled"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsExceptionFilterOptions":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":false,"supportsFunctionBreakpoints":true,"supportsSetExpression":true,"supportsSetVariable":true,"supportsTerminateRequest":true}},"event":"capabilities","seq":"1","type":"event"}
<- (E) {"body":{},"event":"initialized","seq":"2","type":"event"}
-> (C) {"command":"launch","arguments":{"name":".NET Core Launch with netcoredbg","type":"coreclr","request":"launch","preLaunchTask":"build","program":"C:\\Users\\user\\Desktop\\CSHelloWorld/bin/Debug/net8.0/CSHelloWorld.dll","args":[],"cwd":"C:\\Users\\user\\Desktop\\CSHelloWorld","console":"integratedTerminal","stopAtEntry":false,"internalConsoleOptions":"openOnSessionStart","logging":{"engineLogging":false},"pipeTransport":{"pipeCwd":"C:\\Users\\user\\Desktop\\CSHelloWorld","pipeProgram":"cmd","pipeArgs":["/c"],"debuggerPath":"C:/Users/user/Desktop/netcoredbg/netcoredbg.exe"},"__configurationTarget":6,"justMyCode":true,"requireExactSource":true,"enableStepFiltering":true,"suppressJITOptimizations":false,"symbolOptions":{"searchPaths":[],"searchMicrosoftSymbolServer":false,"searchNuGetOrgSymbolServer":false,"cachePath":"","moduleFilter":{"mode":"loadAllButExcluded","excludedModules":[],"includedModules":[],"includeSymbolsNextToModules":true}},"allowFastEvaluate":true,"__sessionId":"8d99ce50-f7a6-4100-8c8e-a66881a4f1a5"},"type":"request","seq":2}
<- (R) {"body":{},"command":"launch","request_seq":2,"seq":"4","success":true,"type":"response"}
-> (C) {"command":"setBreakpoints","arguments":{"source":{"name":"Program.cs","path":"c:\\Users\\user\\Desktop\\CSHelloWorld\\Program.cs","checksums":[{"algorithm":"SHA1","checksum":"f7a9c0f0cd5f5a213f3ab1653219dcdfa4cdab2a"},{"algorithm":"SHA256","checksum":"58b5cd2a89b542c682c66d79ec46b1a4ea4068967382e100a2b70e19f123e75b"},{"algorithm":"SHA1","checksum":"b4d9724c34aa67be4f508554031dc489450b7a94"},{"algorithm":"SHA256","checksum":"cf75d97086067cc100b727a70894b184c9bc81d448e00a93a2009db0d6334cc5"}]},"lines":[5],"breakpoints":[{"line":5}],"sourceModified":false},"type":"request","seq":3}
-> (C) {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":4}
-> (C) {"command":"setExceptionBreakpoints","arguments":{"filters":[],"filterOptions":[{"filterId":"user-unhandled"}]},"type":"request","seq":5}
<- (R) {"body":{"breakpoints":[{"id":1,"line":5,"message":"The breakpoint is pending and will be resolved when debugging starts.","verified":false}]},"command":"setBreakpoints","request_seq":3,"seq":"5","success":true,"type":"response"}
<- (R) {"body":{"breakpoints":[]},"command":"setFunctionBreakpoints","request_seq":4,"seq":"6","success":true,"type":"response"}
<- (R) {"body":{},"command":"setExceptionBreakpoints","request_seq":5,"seq":"7","success":true,"type":"response"}
-> (C) {"command":"configurationDone","type":"request","seq":6}
<- (E) {"body":{"name":"dotnet","systemProcessId":11852,"isLocalProcess":false,"startMethod":"launch"},"event":"process","seq":"8","type":"event"}
<- (R) {"body":{},"command":"configurationDone","request_seq":6,"seq":"9","success":true,"type":"response"}
-> (C) {"command":"threads","type":"request","seq":7}
<- (R) {"body":{"threads":[]},"command":"threads","request_seq":7,"seq":"10","success":true,"type":"response"}
<- (E) {"body":{"module":{"id":"5abecb93-434c-4299-acd0-1d522fdf8da2","name":"System.Private.CoreLib.dll","path":"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\8.0.0\\System.Private.CoreLib.dll","symbolStatus":"Symbols not found."},"reason":"new"},"event":"module","seq":"11","type":"event"}
<- (E) {"body":{"reason":"started","threadId":2784},"event":"thread","seq":"12","type":"event"}
<- (E) {"body":{"module":{"id":"c808041b-c798-4ed5-9950-e9f262bb5d65","name":"CSHelloWorld.dll","path":"C:\\Users\\user\\Desktop\\CSHelloWorld\\bin\\Debug\\net8.0\\CSHelloWorld.dll","symbolStatus":"Symbols loaded."},"reason":"new"},"event":"module","seq":"13","type":"event"}
<- (E) {"body":{"breakpoint":{"endLine":5,"id":1,"line":5,"message":"","source":{"name":"Program.cs","path":"C:\\Users\\user\\Desktop\\CSHelloWorld\\Program.cs"},"verified":true},"reason":"changed"},"event":"breakpoint","seq":"14","type":"event"}
<- (E) {"body":{"module":{"id":"d05e0cb3-3e7a-4a3a-ac33-8113eae805b3","name":"System.Runtime.dll","path":"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\8.0.0\\System.Runtime.dll","symbolStatus":"Symbols not found."},"reason":"new"},"event":"module","seq":"15","type":"event"}
<- (E) {"body":{"module":{"id":"e9914796-1946-419c-943b-352adf3e054a","name":"System.Console.dll","path":"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\8.0.0\\System.Console.dll","symbolStatus":"Symbols not found."},"reason":"new"},"event":"module","seq":"16","type":"event"}
<- (E) {"body":{"allThreadsStopped":true,"reason":"breakpoint","threadId":2784},"event":"stopped","seq":"17","type":"event"}
-> (C) {"command":"threads","type":"request","seq":8}
<- (R) {"body":{"threads":[{"id":2784,"name":"Main Thread"}]},"command":"threads","request_seq":8,"seq":"18","success":true,"type":"response"}
-> (C) {"command":"stackTrace","arguments":{"threadId":2784,"startFrame":0,"levels":20},"type":"request","seq":9}
<- (R) {"body":{"stackFrames":[{"column":1,"endColumn":36,"endLine":5,"id":0,"line":5,"moduleId":"c808041b-c798-4ed5-9950-e9f262bb5d65","name":"Program.<Main>$()","source":{"name":"Program.cs","path":"C:\\Users\\user\\Desktop\\CSHelloWorld\\Program.cs"}}],"totalFrames":1},"command":"stackTrace","request_seq":9,"seq":"19","success":true,"type":"response"}
-> (C) {"command":"threads","type":"request","seq":10}
<- (R) {"body":{"threads":[{"id":2784,"name":"Main Thread"}]},"command":"threads","request_seq":10,"seq":"20","success":true,"type":"response"}
-> (C) {"command":"scopes","arguments":{"frameId":0},"type":"request","seq":11}
<- (R) {"body":{"scopes":[{"expensive":false,"name":"Locals","namedVariables":1,"variablesReference":1}]},"command":"scopes","request_seq":11,"seq":"21","success":true,"type":"response"}
-> (C) {"command":"variables","arguments":{"variablesReference":1},"type":"request","seq":12}
<- (R) {"body":{"variables":[{"evaluateName":"args","name":"args [string[]]","type":"string[]","value":"{string[0]}","variablesReference":0}]},"command":"variables","request_seq":12,"seq":"22","success":true,"type":"response"}
-> (C) {"command":"evaluate","arguments":{"expression":"information","frameId":0,"context":"hover"},"type":"request","seq":13}
<- (R) {"command":"evaluate","message":"error: The name 'information' does not exist in the current context","request_seq":13,"seq":"23","success":false,"type":"response"}
-> (C) {"command":"continue","arguments":{"threadId":2784},"type":"request","seq":14}
<- (E) {"body":{"allThreadsContinued":true,"threadId":2784},"event":"continued","seq":"24","type":"event"}
<- (R) {"body":{"allThreadsContinued":true,"threadId":2784},"command":"continue","request_seq":14,"seq":"25","success":true,"type":"response"}
<- (E) {"body":{"module":{"id":"431afadf-7fdf-4127-9849-87199ddee24d","name":"System.Threading.dll","path":"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\8.0.0\\System.Threading.dll","symbolStatus":"Symbols not found."},"reason":"new"},"event":"module","seq":"26","type":"event"}
<- (E) {"body":{"module":{"id":"b80d719e-3194-4072-8157-3f0b9a29ca5b","name":"System.Text.Encoding.Extensions.dll","path":"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\8.0.0\\System.Text.Encoding.Extensions.dll","symbolStatus":"Symbols not found."},"reason":"new"},"event":"module","seq":"27","type":"event"}
<- (E) {"body":{"module":{"id":"934d95e3-d38b-4dcd-92d7-2db01c8bb03c","name":"System.Runtime.InteropServices.dll","path":"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\8.0.0\\System.Runtime.InteropServices.dll","symbolStatus":"Symbols not found."},"reason":"new"},"event":"module","seq":"28","type":"event"}
<- (E) {"seq":29, "event":"output","type":"event","body":{"category":"stdout","output":"Hello, World!\r\n"}}
Hello, World!
<- (E) {"body":{"reason":"started","threadId":7696},"event":"thread","seq":"30","type":"event"}
<- (E) {"body":{"exitCode":0},"event":"exited","seq":"31","type":"event"}
<- (E) {"body":{},"event":"terminated","seq":"32","type":"event"}
-> (C) {"command":"disconnect","arguments":{"restart":false,"terminateDebuggee":false},"type":"request","seq":15}
<- (R) {"body":{},"command":"disconnect","request_seq":15,"seq":"33","success":true,"type":"response"}

Please make sure you configured your IDE/Plugin/Adapter properly.

from netcoredbg.

GniLudio avatar GniLudio commented on June 26, 2024

@viewizard
I understand that something with my configuration is wrong, but I don't understand what.

When I am using the "same" code with the mock debug adapter the launch request is working.
Only changed the debugger and the debugee file:

// ProcessStartInfo
FileName = "node",
Arguments = Path.Join(baseDirectory, "Adapters", "vscode-mock-debug-0.52.0", "out", "debugAdapter.js"),
// LaunchRequest
{ "program", JToken.FromObject(Path.Join(baseDirectory, "Adapters", "vscode-mock-debug-0.52.0", "sampleWorkspace", "readme.md")) }

from netcoredbg.

GniLudio avatar GniLudio commented on June 26, 2024

@viewizard
I now changed all requests to the exact same arguments as from VSCode and enabled logging with --engineLogging=log.txt.

The only difference I can find in the logs is a exceptionBreakpointFilters response.
(used a json-comparer to find differences)

Why does that response even exist?

Logs

-> (C) {"type":"request","command":"initialize","arguments":{"pathFormat":"path","clientID":"vscode","clientName":"Visual Studio Code","adapterID":"coreclr","locale":"en","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"supportsMemoryReferences":true,"supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryEvent":true,"supportsArgsCanBeInterpretedByShell":true,"supportsStartDebuggingRequest":true},"seq":1}
<- (E) {"body":{"capabilities":{"exceptionBreakpointFilters":[{"filter":"all","label":"all"},{"filter":"user-unhandled","label":"user-unhandled"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsExceptionFilterOptions":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":false,"supportsFunctionBreakpoints":true,"supportsSetExpression":true,"supportsSetVariable":true,"supportsTerminateRequest":true}},"event":"capabilities","seq":"1","type":"event"}
<- (E) {"body":{},"event":"initialized","seq":"2","type":"event"}
<- (R) {"body":{"exceptionBreakpointFilters":[{"filter":"all","label":"all"},{"filter":"user-unhandled","label":"user-unhandled"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsExceptionFilterOptions":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":false,"supportsFunctionBreakpoints":true,"supportsSetExpression":true,"supportsSetVariable":true,"supportsTerminateRequest":true},"command":"initialize","request_seq":1,"seq":"3","success":true,"type":"response"}
-> (C) {"type":"request","command":"launch","arguments":{"name":".NET Core Launch with netcoredbg","type":"coreclr","preLaunchTask":"build","program":"D:\\DAP\\CSHelloWorld\\bin\\Debug\\net8.0\\CSHelloWorld.dll","args":[],"cwd":"D:\\DAP\\CSHelloWorld","console":"integratedTerminal","stopAtEntry":false,"internalConsoleOptions":"openOnSessionStart","logging":{"engineLogging":false},"__configurationTarget":6,"__sessionId":"8d99ce50-f7a6-4100-8c8e-a66881a4f1a5","allowFastEvaluate":true,"enableStepFiltering":true,"justMyCode":true,"request":"launch","suppressJITOptimizations":false,"requireExactSource":true,"pipeTransport":{"debuggerPath":"D:/DAP/Adapters/netcoredbg-3.0.0-1018-win64/netcoredbg.exe","pipeArgs":["/c"],"pipeCwd":"D:\\DAP\\CSHelloWorld","pipeProgram":"cmd"},"symbolOptions":{"cachePath":"","moduleFilter":{"excludedModules":[],"includedModules":[],"includeSymbolsNextToModules":true,"mode":"loadAllButExcluded"},"searchMicrosoftSymbolServer":false,"searchNuGetOrgSymbolServer":false,"searchPaths":[]}},"seq":2}
<- (R) {"body":{},"command":"launch","request_seq":2,"seq":"4","success":true,"type":"response"}

from netcoredbg.

viewizard avatar viewizard commented on June 26, 2024

Why does that response even exist?

<- (R) {"body":{"exceptionBreakpointFilters":[{"filter":"all","label":"all"},{"filter":"user-unhandled","label":"user-unhandled"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsExceptionFilterOptions":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":false,"supportsFunctionBreakpoints":true,"supportsSetExpression":true,"supportsSetVariable":true,"supportsTerminateRequest":true},"command":"initialize","request_seq":1,"seq":"3","success":true,"type":"response"}

is response for "command":"initialize","request_seq":1,", but not exceptionBreakpointFilters response.

netcoredbg also provide this response, but VSCode IDE hide it (related to MS debuggers check, since MS don't allow use MS debuggers outside of MS IDEs), as you could see in VSCode IDE log I provided, netcoredbg provide events/responses with "seq":"1", "seq":"2", "seq":"4", but no event/response from debugger with "seq":"3" (was removed from VScode logs by VSCode IDE).
For example, in case of MI GDB protocol, MS have standalone -handshake init command for same purpose with response like -handshake response bla-bla-bla, without this "initialization" MS debuggers will not work.

from netcoredbg.

GniLudio avatar GniLudio commented on June 26, 2024

@viewizard
Thanks for you help.

After adding an ConfigurationDone request after the LaunchRequest it executes.
I should have thought about that before assuming things are not working...

from netcoredbg.

GniLudio avatar GniLudio commented on June 26, 2024

I forgot to add a ConfigurationDone request after the LaunchRequest.

from netcoredbg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.