Skip to content

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

Closed
@SQLvariant

Description

@SQLvariant

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%

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions