File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1475,7 +1475,7 @@ class PhpDebugSession extends vscode.DebugSession {
14751475 if ( res . property ) {
14761476 result = res . property
14771477 }
1478- } else if ( args . context === 'repl' || args . context === 'watch' ) {
1478+ } else if ( args . context === 'repl' ) {
14791479 const uuid = randomUUID ( )
14801480 await connection . sendEvalCommand ( `$GLOBALS['eval_cache']['${ uuid } ']=${ args . expression } ` )
14811481 const ctx = await stackFrame . getContexts ( ) // TODO CACHE THIS
@@ -1489,6 +1489,14 @@ class PhpDebugSession extends vscode.DebugSession {
14891489 response . body = { result : await varExportProperty ( res . property ) , variablesReference : 0 }
14901490 this . sendResponse ( response )
14911491 return
1492+ } else if ( args . context === 'watch' ) {
1493+ const uuid = randomUUID ( )
1494+ await connection . sendEvalCommand ( `$GLOBALS['eval_cache']['watch']['${ uuid } ']=${ args . expression } ` )
1495+ const ctx = await stackFrame . getContexts ( ) // TODO CACHE THIS
1496+ const res = await connection . sendPropertyGetNameCommand ( `$eval_cache['watch']['${ uuid } ']` , ctx [ 1 ] )
1497+ if ( res . property ) {
1498+ result = res . property
1499+ }
14921500 } else {
14931501 const res = await connection . sendEvalCommand ( args . expression )
14941502 if ( res . result ) {
You can’t perform that action at this time.
0 commit comments