Comments (12)
There is an example powershell folder in the respository, and it looks like this:
{
"version": "0.1.0",
"configurations": [
{
"name": "PowerShell",
"type": "PowerShell",
"program": "DebugTest.ps1"
}
]
}
You need to change the program to the name of the script that you want to run. I made the mistake of just writing the function name, but just got it to work with the actual file name.
from vscode-powershell.
Thanks @ThePSAdmin! Yes, there isn't a default configuration provided. This is a little confusing, I'll see if I can get something in there by default.
from vscode-powershell.
Thanks PSAdmin!
from vscode-powershell.
If I go into a directory and launch the debugger, and there's not a launch.config, I would expect a prompt to create one (this exists) that is pre-populated with the values needed to run the script I am currently viewing (this does not.)
And thanks guys; this plug-in is great stuff!
from vscode-powershell.
Hey James, this will be added in a future release. The VS Code team told me what I need to do to make it happen.
from vscode-powershell.
Is this issue fixed? I'm still seeing the same problem with latest VSCode and Powershell Extension.
VSCode 0.10.10
from vscode-powershell.
Yep, it's been fixed for a long time. Can you tell me the sequence of steps you take and what you observe?
from vscode-powershell.
Here is problems steps recorder what is happening
from vscode-powershell.
Thanks! That was helpful. I'm pretty sure Visual Studio Code does not allow you to debug a single opened file. You'll need to open the folder that this file is contained in using File -> Open Folder
before the debugger will be able to generate a launch.json for your project.
from vscode-powershell.
Not sure what I'm doing wrong but the same thing happens when I open folder.
from vscode-powershell.
Now you've got a launch.json file, click the green debug 'start' button again :) VS Code has to generate the default launch.json first as a one-time step when one doesn't exist. Now that you have one, your script will be able to run.
from vscode-powershell.
Thanks, that did it
from vscode-powershell.
Related Issues (20)
- Command Explorer should be hidden by default
- Ctrl-space results in writing a character HOT 17
- Ctrl-space results in A characters HOT 2
- The use of "-" in snippet prefixes should be prohibited. HOT 9
- PssaCmdletAnalysisEngine fails with "Errors found while formatting file" and no additional data HOT 3
- Some variables are not highlighted (`$Error`, `$PSVersionTable`) HOT 1
- Incorrect indentation when passing a hashtable as a function argument HOT 3
- Extension do not work HOT 2
- Recalling a previous command via PSReadLine in VScode is unusable is the prompt contains U+231B in the CaskaydiaCove NF font HOT 3
- PowersShell Installation version issue
- Azure Repos Virtual Filesystem: Intellisense stops working on branches other than "main". Only returns "no suggestions". Works fine on "main" branch. HOT 6
- VS Code with PowerShell extension fails to assig a value to a variable HOT 1
- Debug string [DBG] not displayed in the terminal HOT 19
- Powershell Extension never starts. Terminal Message: "Starting server, deregistering host logger and registering shutdown listener" HOT 11
- Launching VSCode Also Opens cmd.exe Console Behind VSCode HOT 3
- Intellisense not working for properties of the same type as the class HOT 2
- v2024.2.0 No longer loads my Pwsh profile in the integrated terminal. How can I fix this? HOT 6
- v2024.2.0: PowerShell Terminal Fails to Load Due to PSES change to non-Windows-trusted Certificate HOT 36
- If Connecting to MSGraph then connecting to ExchangeOnline, error OperationStopped: Could not load file or assembly 'Microsoft.Identity.Client, Version=4.44.0.0. HOT 3
- whitespaceBetweenParameters Removing Redirectors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-powershell.