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

Adding new function to top of file causes build, debug errors #242504

Closed
dgoldman-msft opened this issue Mar 3, 2025 · 1 comment
Closed

Adding new function to top of file causes build, debug errors #242504

dgoldman-msft opened this issue Mar 3, 2025 · 1 comment
Assignees

Comments

@dgoldman-msft
Copy link

Type: Bug

  1. Installed latest PowerShell extension
  2. Created script file
  3. Select All + F8
  4. Set breakpoint
  5. Select Run from menu and debug - all is ok
  6. Add new function to the top of the file with any name or tab complete a basic template function.
  7. Select Run and debug

function: C:\Users\testuser\Start-Test\Start-Test.ps1:1:1
Line |
1 | function Write-ToLog {
| ~~~~~~~~~
| The term 'function' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

After this debugging is broken. Removed and reinstalled the PowerShell extension and its the same result.

VS Code version: Code 1.97.2 (e54c774, 2025-02-12T23:20:35.343Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i7-13800H (20 x 2918)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 63.66GB (31.46GB free)
Process Argv --crash-reporter-id 9fa2fe10-62dc-4403-8d94-fb8b2438acbd
Screen Reader no
VM 0%
Extensions (16)
Extension Author (truncated) Version
vscode-markdownlint Dav 0.59.0
gitlens eam 16.3.2
vs-code-xml-format fab 0.1.5
cshtml fir 0.1.3
copilot Git 1.275.0
copilot-chat Git 0.24.1
rainbow-csv mec 3.17.0
vscode-html-format moh 0.1.6
vscode-dotnet-runtime ms- 2.2.8
notepadplusplus-keybindings ms- 1.0.7
powershell ms- 2025.0.0
code-spell-checker str 4.0.40
intellicode-api-usage-examples Vis 0.2.9
vscode-java-debug vsc 0.58.1
vscode-java-dependency vsc 0.24.1
chat-gpt zha 1.8.7
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
py29gd2263:31024239
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc2:31192216
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
jda6j935:31233686
copilothoveroff:31248523

@roblourens
Copy link
Member

You can file this on the repo for the Powershell extension

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

2 participants