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

Passing Debug Arguments with .netcoredbg #574

Open
larrasket opened this issue Mar 6, 2022 · 3 comments
Open

Passing Debug Arguments with .netcoredbg #574

larrasket opened this issue Mar 6, 2022 · 3 comments

Comments

@larrasket
Copy link

There is no documentation about which flag to use in specifying the debugging arguments with .NetCoredDbg & weather to use :args or arguments :. I tried a bunch of configuration though, none worked, my program is still being launched without any arguments. Here is my last simple try:

(dap-register-debug-template
  "NetCoreDbg::Launch"
  (list :type "coreclr"
        :arguments "--file /home/ghd/me/temp/files/psdata/in/data.txt"
        :request "launch"
        :mode "launch"
        :name "testing::pleasework"))
@s-kostyaev
Copy link
Collaborator

Try to use args and add -- or even -- -- before real arguments Samsung/netcoredbg#68 (comment)

@s-kostyaev
Copy link
Collaborator

s-kostyaev commented Jun 30, 2022

and looks like args should be vector - https://code.visualstudio.com/docs/editor/variables-reference#_environment-variables not string

@Xioulious
Copy link

I'm running into this same problem, I need to start the debug on a different profile from what it defaults to.
I tried the following in a .dir-locals.el file, but it doesnt seem to work:

((nil . ((eval . (dap-register-debug-template 
                                "NetCoreDbg::Launch-local"
                                  (list :type "coreclr"
                                        :args '("--launch-profile=https")
                                        :request "launch"
                                        :preLaunchTask "build"
                                        :mode "launch"
                                        :name "NetCoreDbg::Launch"
                                        :dap-compilation "dotnet build"
                                        ))))))

I've checked your links, but even with those I can't get to the right combination to get it to work.
The debug will start with those settings, but it will ignore the argument given and thus start on the wrong profile still.

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

3 participants