question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pass command line arguments for "Run Without Debugging"

See original GitHub issue

I’m so sorry to bother you with this little question …

I know how to pass command line arguments to a debug target, but when I executed CMake: run without debugging, I found no argument was passed to the target. Did I miss any steps?

I will be very grateful to you if this problem was solved. Thank you.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

14reactions
JodiTheTiggercommented, May 20, 2021

For anyone trying to figure out how to actually do this, you need to add the args array to cmake.debugConfig in your settings.json

"cmake.debugConfig": {
    "args": [
        "-first", 
        "-second"
    ]
 }
5reactions
andreeiscommented, Apr 19, 2021

CMake Tools 1.7.0 was released today and it contains a fix for this issue. Upgrade the extension in VSCode and let us know if you encounter any other problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set command line parameters for "run without ...
I'm working on a console application with a lot of command line argument. I can set them for debug in project properties, but...
Read more >
Visual Studio Debug Command Line Arguments not pass the ...
One issue that bothers me is that when I debug, I need to pass some arguments from the Debug Command Line Arguments box....
Read more >
Code Running Assistance | PyCharm Documentation - JetBrains
When running your Python scripts, you can pass various values as command-line arguments. Use the Parameter field in the Python run/debug ...
Read more >
CS585 : Getting Started with Visual Studio Tutorial
To set command-line arguments in Visual Studio, right click on the project name, then go to Properties. In the Properties Pane, go to...
Read more >
How to Pass Command Line Arguments using Visual Studio
1. Right Click on Project from Solution Explorer and Select Properties . · 2. In the Project Properties Windows, Navigate to “Debug Tab”...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found