View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001476 | Xdebug | Uncategorized | public | 2017-10-03 21:58 | 2017-10-05 12:33 |
Reporter | kriyate | Assigned To | derick | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 2.5.5 | ||||
Summary | 0001476: error evaluating code errors in REPL | ||||
Description | Hi there: I am Xdebug via Felix Becker's PHP Debug extension (https://github.com/felixfbecker/vscode-php-debug) for Visual Studio Code 1.16.1. I'm connecting to XDebug just fine, can set breakpoints and view variables in the debug pane without any issues. However, I am consistently getting My question is what kind of PHP commands can I send to the REPL? It seems like all I am able to do is declare variables, arrays, and objects. I can't declare classes, functions, use control structures ( Works:
Doesn't Work:
I'm a little confused because I thought I could use any valid PHP command in the console, similar to PHPStorm's console. Thanks. | ||||
Steps To Reproduce | type the following into debug console after launching a debug session:
| ||||
Additional Information | Note: duplicate of my Stack Exchange question My error: https://i.stack.imgur.com/HqZeP.png PHP version: 7.1.8 Your launch.json:
XDebug php.ini config:
XDebug logfile (from setting
Adapter logfile (from setting
| ||||
Tags | No tags attached. | ||||
Operating System | OS X 10.12.6 | ||||
PHP Version | 7.1.0-7.1.4 | ||||
|
In order for this to work, you need to use correct PHP syntax. From your image, the 3 foreach'es are all incorrect syntax, as the last var_dump()'s ; is missing. This doesn't work in PHP: derick@singlemalt:~ $ php Parse error: syntax error, unexpected '}' in - on line 2 The error from your log: <- eval -i 21 -- ZWNobyAieWVzIg== is correct too, as ZWNobyAieWVzIg== translates to echo "yes", which is missing its ; at the end: derick@singlemalt:~ $ php -r "eval(base64_decode('ZWNobyAieWVzIg=='));" Parse error: syntax error, unexpected end of file, expecting ',' or ';' in Command line code(1) : eval()'d code on line 1 And declaring functions and classes do not return a value. |
|
Hi Derick: |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-10-03 21:58 | kriyate | New Issue | |
2017-10-04 09:58 | derick | Note Added: 0004434 | |
2017-10-04 09:58 | derick | Status | new => resolved |
2017-10-04 09:58 | derick | Resolution | open => no change required |
2017-10-04 09:58 | derick | Assigned To | => derick |
2017-10-05 12:33 | kriyate | Note Added: 0004435 | |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |