erlang-ls / erlang_ls

The Erlang Language Server
https://erlang-ls.github.io/
Apache License 2.0
618 stars 136 forks source link

Breakpoint not hit in OTP source code #1492

Open Mikaka27 opened 5 months ago

Mikaka27 commented 5 months ago

Describe the bug After following https://erlang-ls.github.io/articles/tutorial-debugger/ to the best of my ability in OTP source code repo, I cannot get to the point that breakpoint get's hit.

To Reproduce Before following this, your system must have this utilities installed: https://github.com/erlang/otp/blob/master/HOWTO/INSTALL.md#required-utilities

  1. git clone https://github.com/erlang/otp.git
  2. Open otp folder in vscode with erlang_ls installed
  3. Put the following into .vscode/settings.json
    {
    "erlang_ls.serverPath": "",
    "terminal.integrated.env.linux": {
        "ERL_TOP": "${workspaceFolder}",
        "PATH": "${workspaceFolder}/bin:${env:PATH}"
    }
    }
  4. Put the following into .vscode/launch.json while replacing hostname
    {
    // 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": "common test",
            "type": "erlang",
            "request": "attach",
            "projectnode": "ct@stacjonarny", <-------------------REPLACE HOSTNAME HERE!!!
            "cookie": "QCPKEUVDZXBWDBVRXZEV",
            "timeout": 300,
            "cwd": "${workspaceFolder}"
        }
    ]
    }
  5. Restart vscode and open otp folder again
  6. Open integrated shell
  7. ./otp_build configure
  8. make
  9. Open lib/common_test/src/ct_auto_clean_SUITE.erl
  10. Put breakpoint onto line 150 (first line of clean/1 function)
  11. Hit F5 to start remote debugging
  12. In integrated shell put: make common_test_test ARGS="-suite ct_auto_clean_SUITE" TEST_NEEDS_RELEASE=False LOCAL_DEPS=debugger

I've skipped adding {overrides, [{hello_world, "../hello_world"}]}. because the project does not have relx.config file, not sure what this line is doing exactly. Also attaching dap_server.log file.

Any help is appreciated, thanks :)

Expected behavior Breakpoint should be hit.

Actual behavior Test executes fully, but no breakpoint is hit.

Context