-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
Cannot set env without running a program. #860
Comments
Interesting. What is the vscode version? |
Hi, I am also experiencing this exact same issue. My VSCode version is 1.74.0, and the extension version is v1.29.0. |
I've made a fix for this, see my PR #872 |
Thanks. So weird that it never happens to me. Will look at the PR |
Quite curious, I still cannot reproduce the issue. Do you have any other PHP related extensions installed? |
The only other PHP-related extension I have installed is PHP Intelephense, nothing else. |
Could you try to disable all other extensions? I will release a version (hopefully today) with this fix, but I'd like to take this up with Microsoft if it turns out that vscode is doing this. |
Alternatively, I think there is a Help>Report option where you can also generate a list of all active extensions. |
I've installed 1.29.1 and can confirm the bug is no longer present.
|
I went over the most extensions that would make sense but could not find any Thanks for all the help! |
Hi - I'm unable to launch the debugger - I receive the error that was mentioned in #788 (
Cannot set env without running a program. Please remove env from [Listen for Xdebug] configuration.
)Note that I do not have an
env
variable set in my launch config - see below.VS Code extension version: 1.29.0
Your launch.json:
VS Code extension logfile (from setting
"log": true
in launch.json):I edited the extension source to print the contents of
args.env
in the error message:throw new Error(
Cannot set env without running a program.\nPlease remove envs: ${JSON.stringify(args.env)} from [${args.name || 'unknown'}] configuration.);
You can see in the debugging output that
env
is an empty object - as the extension is testing forargs.env !== undefined
it is failing the test.I'm not sure if there was a change to the extension or even VSCode itself that is causing this variable to now be an empty object, or whether there is something weird about my IDE setup, but I don't see any obvious issues.
Perhaps this error might be better off as a warning?
The text was updated successfully, but these errors were encountered: