File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
55The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ ) and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
66
7+ ## [ 1.36.1]
8+
9+ - Improve handling of watch for static properties
10+
711## [ 1.36.0]
812
913- Implement copy to clipboard in var_export format
Original file line number Diff line number Diff line change @@ -1490,8 +1490,12 @@ class PhpDebugSession extends vscode.DebugSession {
14901490 this . sendResponse ( response )
14911491 return
14921492 } else if ( args . context === 'watch' ) {
1493+ // try to translate static variable to special Xdebug format
1494+ if ( args . expression . startsWith ( 'self::$' ) ) {
1495+ args . expression = '$this::' + args . expression . substring ( 7 )
1496+ }
14931497 // if we suspect a function call
1494- if ( args . expression . includes ( '(' ) ) {
1498+ if ( ! args . expression . startsWith ( '$' ) || args . expression . includes ( '(' ) ) {
14951499 if ( stackFrame . level !== 0 ) {
14961500 throw new Error ( 'Cannot evaluate function calls when not on top of the stack' )
14971501 }
You can’t perform that action at this time.
0 commit comments