Skip to content

New-EditorFile error Exception calling "GetEditorContext" with "0" argument(s): "One or more errors occurred." #905

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

Closed
SQLvariant opened this issue Apr 3, 2019 · 1 comment · Fixed by #906

Comments

@SQLvariant
Copy link

Issue Type: Bug

When in a blank VS Code or ADS window (meaning no files open anywhere in the editor) and running New-EditorFile from the PowerShell Integrated Console, I receive the following error message:

"Exception calling "GetEditorContext" with "0" argument(s): "One or more errors occurred."
At C:\Users\Amanda.azuredatastudio\extensions\ms-vscode.powershell-1.11.0\modules\PowerShellEditorServices\Commands\Public\CmdletInter
face.ps1:140 char:21

  • ... $psEditor.GetEditorContext().CurrentFile.InsertText(($val ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : AggregateException"

If I open at least one file of any type (.ps1, .sql) the error goes away.

Azure Data Studio version: azuredatastudio 1.6.0-insider (a4c2463b2f63c495f2840cefea6e74eda024777d, 2019-04-01T07:40:40.847Z)
OS version: Windows_NT x64 10.0.18362

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (8 x 2112)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 15.93GB (4.73GB free)
Process Argv
Screen Reader no
VM 0%
@TylerLeonhardt
Copy link
Member

Nice catch - I have this fixed here: #906

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

Successfully merging a pull request may close this issue.

2 participants