4

UPDATE: I found out my actual issue is that VSCode does not use ipthon (as far as I can tell) in the debugging console (I am used to sypder). VSCode says it supports Jupiter notebooks but I cannot find any reference to how to use ipthon when debugging although there is an an old comment on stackoverfow saying its coming in a future version but the link is dead. So for now its back to spyder. I left the original question for those newbies to VSCode who are stumped by the same issue.

Sorry for the very simple question but I just started using VS Code and when debugging python scripts the output in the debug console escapes line breaks. How do I stop that behavior?

For example :

df = pd.DataFrame(np.arange(10),columns=['Close'])

If I enter df into the debug console I get:

df

Close\n0       0\n1       1\n2       2\n3       3\n4       4\n5       5\n6       6\n7       7\n8       8\n9       9
Gama11
  • 31,714
  • 9
  • 78
  • 100
WGee
  • 81
  • 7
  • Forgot to mention the json configuration is for version 0.2.0 Python: Current File (Integrated Terminal) – WGee Feb 22 '19 at 19:16

1 Answers1

1

Check if VSCode 1.43 (Feb. 2020) will help:

VS Code Debug no longer escaping whitespace

The VS Code debugger UI no longer escapes or quotes any whitespace received from a debug extension or debug adapter.
For example all strings received in DAP Variables or as DAP Output events are shown in the UI as they are without modification.

This means that it is now up to the debug extension or debug adapter to decide if whitespace needs to be escaped before sending the data to VS Code.
More details can be found in #73845 and commit f647e12.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250