Disabling string escaping in debugger


If I have a string consisting of these characters: I'm rich! and I look at this string in the pyCharm debugger, I'm shown 'I\\'m rich!'

Is it possible to see it without the leading, trailing, and escaped single quotes (ie as it would be stored in memory)?

In more complex strings all the escaping shown by the debugger can make it hard to really understand what characters really are, or are not, in the string.



Hi Michael,

What is the exact code that you use?

The following snippet doesn't give me such result:

print("I'm rich!")

I'm talking about looking at variables in the debugger. For example, in the item shown below, you can see the debugger shows the string \\'datapoint\\'.  If you were to look at the string "in memory", you wouldn't see \\. you'd see   `datapoint`.     So I'm talking about a "raw display" option whereby pyCharm does not add any quoting when it displays the content of a string.. It just shows 100% what's actually in the string.


Oh, I see, thanks for clarification.

Seems to be known issue https://youtrack.jetbrains.com/issue/PY-19383 (this one is similar https://youtrack.jetbrains.com/issue/PY-16583). Please vote for them and follow for updates.


Please sign in to leave a comment.