Breakpoints do not fall when debugging a F # console application in VSCode using the Mono Debug extension

I created a test console application and tried to debug it using the VSCode and Mono Debug extensions.

Fsharp code:

module TestFharp

[<EntryPoint>]
let main argv =
    printfn "Args %A" argv
    let x = 5
    printf "hello world"
    0 

launch.json:

{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Launch",
            "type": "mono",
            "request": "launch",
            "program": "C:/FSharp/test/TestFharp/bin/Debug/TestFharp.exe",
            "args": [],
            "cwd": "${workspaceRoot}",
            "preLaunchTask": "",
            "runtimeExecutable": null,
            "env": {},
            "externalConsole": false,
            "stopOnEntry": true
        },
        {
            "name": "Attach",
            "type": "mono",
            "request": "attach",
            "address": "localhost",
            "port": 55555
        }
    ]
}

window exit DEBUG CONSOLE

mono --debug --debugger-agent=transport=dt_socket,server=y,address=127.0.0.1:61724 C:/FSharp/test/TestFharp/bin/Debug/TestFharp.exe 
Args [||]
hello world
  • Do I need to make any other settings to get to the breakpoint?
  • What is the difference between the exe file inside the build folder and \ projectFolder \ bin \ Debug?
+6
source share
3 answers

What is the difference between the exe file inside the build folder and \ projectFolder \ bin \ Debug

exe build FAKE build script (build.fsx file) [ Ionide Ctrl + F5/FAKE: Build default]

exe \projectFolder\bin\Debug MsBuild. Ionide MsBuild MsBuild: Build project.

exe (FAKE MsBuild ), (, ) - FAKE , MsBuild .

, , exe launch.json

externalConsole true.

, F5 .

0

launch.json : (: "" ), (: "" ). .

"" "", - . , - .

"" , - , .

, , , .

, , TestFharp.exe ?

0

The installed attach configuration uses port 55555, but the method for launching your application indicates 61724 for the debugger, so try synchronizing the two.

-one
source

Source: https://habr.com/ru/post/1015911/


All Articles