Hex
Hex

Reputation: 444

How to show '\n' and '\t' characters in VS Code?

I'm debugging a laravel app and I need to know if any of these characters ( \n \t ) are present.

Previously VS Code did show them, now it does not:

enter image description here

Is there any way to enable this again?


I'm using Xdebug + VS Code.

Upvotes: 2

Views: 8399

Answers (3)

Matt
Matt

Reputation: 490

Gremlin Tracker plugin for VS Code is great for finding invisible/weird characters in combination with the "Render Line Endings" plugin.

Gremlin Tracker: https://marketplace.visualstudio.com/items?itemName=nhoizey.gremlins

Render Line Endings: https://marketplace.visualstudio.com/items?itemName=medo64.render-crlf

Upvotes: 0

Hex
Hex

Reputation: 444

It seems Visual studio code "delegated" this escape to the debugger, I have spoken to the developer of xDebug and they told me they aren't escaping anything on their side, it seems a problem of vs code and this should be an option for the end-user not the debugger.

there's no current way of doing this atm on this date

Upvotes: 1

johnymachine
johnymachine

Reputation: 826

This might help?

  // Controls how the editor should render whitespace characters.
  //  - none
  //  - boundary: Render whitespace characters except for single spaces between words.
  //  - selection: Render whitespace characters only on selected text.
  //  - all
  "editor.renderWhitespace": "selection",

https://code.visualstudio.com/docs/getstarted/settings

Upvotes: 0

Related Questions