File tree 4 files changed +16
-4
lines changed
4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1
1
# vscode-powershell Release History
2
2
3
+ ## 0.12.1
4
+ ### Tuesday, April 4, 2017
5
+
6
+ - Fixed [ #648 ] ( https://github.com/PowerShell/vscode-powershell/issues/648 ) -
7
+ Resolved an error when launching an untitled script file in a workspace
8
+ with no launch.json or in a window without a workspace path
9
+
3
10
## 0.12.0
4
11
### Tuesday, April 4, 2017
5
12
Original file line number Diff line number Diff line change 1
- version : ' 0.12.0 -insiders-{build}'
1
+ version : ' 0.12.1 -insiders-{build}'
2
2
image : Visual Studio 2017
3
3
clone_depth : 10
4
4
skip_tags : true
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " PowerShell" ,
3
3
"displayName" : " PowerShell" ,
4
- "version" : " 0.12.0 " ,
4
+ "version" : " 0.12.1 " ,
5
5
"publisher" : " ms-vscode" ,
6
6
"description" : " Develop PowerShell scripts in Visual Studio Code!" ,
7
7
"engines" : {
Original file line number Diff line number Diff line change @@ -25,13 +25,19 @@ export class DebugSessionFeature implements IFeature {
25
25
26
26
private startDebugSession ( config : any ) {
27
27
28
+ let currentDocument = vscode . window . activeTextEditor . document ;
29
+
28
30
if ( ! config . request ) {
29
31
// No launch.json, create the default configuration
30
32
config . type = 'PowerShell' ;
31
33
config . name = 'PowerShell Launch Current File' ;
32
34
config . request = 'launch' ;
33
35
config . args = [ ] ;
34
- config . script = vscode . window . activeTextEditor . document . fileName ;
36
+
37
+ config . script =
38
+ currentDocument . isUntitled
39
+ ? currentDocument . uri . toString ( )
40
+ : currentDocument . fileName ;
35
41
}
36
42
37
43
if ( config . request === 'launch' ) {
@@ -41,7 +47,6 @@ export class DebugSessionFeature implements IFeature {
41
47
// For launch of "current script", don't start the debugger if the current file
42
48
// is not a file that can be debugged by PowerShell
43
49
if ( config . script === "${file}" ) {
44
- let currentDocument = vscode . window . activeTextEditor . document ;
45
50
46
51
if ( currentDocument . isUntitled ) {
47
52
if ( currentDocument . languageId === 'powershell' ) {
You can’t perform that action at this time.
0 commit comments