File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,7 @@ class PhpDebugSession extends vscode.DebugSession {
241241 ] ,
242242 supportTerminateDebuggee : true ,
243243 supportsDelayedStackTraceLoading : false ,
244+ supportsClipboardContext : true ,
244245 }
245246 this . sendResponse ( response )
246247 }
@@ -1441,6 +1442,17 @@ class PhpDebugSession extends vscode.DebugSession {
14411442 if ( response . property ) {
14421443 result = response . property
14431444 }
1445+ } else if ( args . context === 'clipboard' ) {
1446+ const uuid = randomUUID ( )
1447+ await connection . sendEvalCommand ( `$GLOBALS['eval_cache']['${ uuid } ']=var_export(${ args . expression } , true)` )
1448+ const ctx = await stackFrame . getContexts ( ) // TODO CACHE THIS
1449+ const res = await connection . sendPropertyGetNameCommand ( `$eval_cache['${ uuid } ']` , ctx [ 1 ] )
1450+ if ( res . property ) {
1451+ // force a string response
1452+ response . body = { result : res . property . value , variablesReference : 0 }
1453+ this . sendResponse ( response )
1454+ return
1455+ }
14441456 } else {
14451457 const response = await connection . sendEvalCommand ( args . expression )
14461458 if ( response . result ) {
Original file line number Diff line number Diff line change @@ -827,7 +827,7 @@ describe('PHP Debug Adapter', () => {
827827 await Promise . all ( [ client . launch ( { maxConnections : 1 , log : true } ) , client . configurationSequence ( ) ] )
828828
829829 const s1 = net . createConnection ( { port : 9003 } )
830- await client . assertOutput ( 'console' , 'new connection 1 from ' )
830+ await client . assertOutput ( 'console' , 'new connection ' )
831831 net . createConnection ( { port : 9003 } )
832832 const o = await client . waitForEvent ( 'output' )
833833 assert . match (
You can’t perform that action at this time.
0 commit comments