File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { BreakpointManager, BreakpointAdapter } from './breakpoints'
1515import * as semver from 'semver'
1616import { LogPointManager } from './logpoint'
1717import { ProxyConnect } from './proxyConnect'
18+ import { randomUUID } from 'crypto'
1819
1920if ( process . env [ 'VSCODE_NLS_CONFIG' ] ) {
2021 try {
@@ -1214,6 +1215,14 @@ class PhpDebugSession extends vscode.DebugSession {
12141215 if ( response . property ) {
12151216 result = response . property
12161217 }
1218+ } else if ( args . context === 'repl' ) {
1219+ const uuid = randomUUID ( )
1220+ await connection . sendEvalCommand ( `$GLOBALS['eval_cache']['${ uuid } ']=${ args . expression } ` )
1221+ const ctx = await stackFrame . getContexts ( ) // TODO CACHE THIS
1222+ const response = await connection . sendPropertyGetNameCommand ( `$eval_cache['${ uuid } ']` , ctx [ 1 ] )
1223+ if ( response . property ) {
1224+ result = response . property
1225+ }
12171226 } else {
12181227 const response = await connection . sendEvalCommand ( args . expression )
12191228 if ( response . result ) {
You can’t perform that action at this time.
0 commit comments