Vscode-php-debug: Variable gets truncated

Created on 17 Apr 2018  路  5Comments  路  Source: xdebug/vscode-php-debug

Why do variables get truncated and not show the full value? Is there any way to change this to show the full variable value?

image

Most helpful comment

@PipCodeBoy

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Listen for XDebug",
      "type": "php",
      "request": "launch",
      "port": 9000,
      "pathMappings": {
        "/app/": "${workspaceRoot}"
      },
      "xdebugSettings": {
        "max_data": -1,
        "max_children": -1
      }
    },
    {
      "name": "Launch currently open script",
      "type": "php",
      "request": "launch",
      "program": "${file}",
      "cwd": "${fileDirname}",
      "port": 9000
    }
  ]
}

All 5 comments

Please refer to the XDebug documentation, the adapter doesn't truncate it, it's XDebug. You can customize XDebug settings through launch.json. They get truncated because else big variables can easily slow down the debugger.

And where do I find the parameter to add to launch.json that fixes that?? Thanks

@PipCodeBoy

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Listen for XDebug",
      "type": "php",
      "request": "launch",
      "port": 9000,
      "pathMappings": {
        "/app/": "${workspaceRoot}"
      },
      "xdebugSettings": {
        "max_data": -1,
        "max_children": -1
      }
    },
    {
      "name": "Launch currently open script",
      "type": "php",
      "request": "launch",
      "program": "${file}",
      "cwd": "${fileDirname}",
      "port": 9000
    }
  ]
}

@skippednote That worked but now VSCode is having a hard time displaying 132 attributes 馃槕

image

Same with strings, while I can now copy and paste the value in full with the new settings (thank you for that example by the way). I cannot actually see the data within vscode.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bilogic picture bilogic  路  7Comments

QwertyZW picture QwertyZW  路  9Comments

johnbillion picture johnbillion  路  11Comments

mitchellnemitz picture mitchellnemitz  路  11Comments

johnbillion picture johnbillion  路  6Comments