1

Is it possible to add the current time to debug configuration in Visual Studio Code? For example:

{
    // 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": "Run Module with Time",
            "type": "python",
            "request": "launch",
            "module": "my_module",
            "args": [
                "-time",
                "CURRENT TIME",

            ]
        }
    ]
}
1

2 Answers 2

1

You can use the extension Command Variable and use the command extension.commandvariable.dateTime (see example 3 in the link). You have to use an ${input:XXXX} variable because of the passed arguments.

Sign up to request clarification or add additional context in comments.

Comments

0

check this code example it's working in my case

    "date: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE
     $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.