Is it possible to select and copy multi-line strings from the results #22832
-
I've an application that writes .Net exception stack traces to a database table. I often want to copy them so that I can paste them into Visual Studio's Exception explorer window. However this doesn't work because Azure Data Studio is removing the CR/LF characters from the strings before displaying them in the Results grid. I can get around this by selecting with a replace and then I can replace the \r\n characters in a text editor with the correct characters. Something like this:
Is there a better way of doing this though? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hey @martingbrown - when you ask if there is a better way of doing this....are you looking for a different approach in terms of the REPLACE code you're using here, or something else? Just want to make sure I understand the question. Thanks! |
Beta Was this translation helpful? Give feedback.
-
@martingbrown ah, ok, there is a setting to disable that. Use CRTL/CMD + , to get to Settings, and then search for "copy remove" and you should find the Results: Copy Remove New Line option. Uncheck that and when you copy the text, the CR/LF should be preserved. |
Beta Was this translation helpful? Give feedback.
-
Thank you. That's mostly what I was after. I don't suppose there is a way to easily toggle that for a single copy operation? Changing the setting feels a bit permanent. On the context menu, for instance, there is already "Copy", "Copy With Headers" and "Copy Headers". I guess this threw me off the idea of looking at settings, because I assumed there would be a fourth menu option "Copy with line endings" if this could be done. |
Beta Was this translation helpful? Give feedback.
-
@martingbrown There is not a quicker way to toggle, or toggle selectively. It's a setting at the app level. |
Beta Was this translation helpful? Give feedback.
@martingbrown ah, ok, there is a setting to disable that. Use CRTL/CMD + , to get to Settings, and then search for "copy remove" and you should find the Results: Copy Remove New Line option. Uncheck that and when you copy the text, the CR/LF should be preserved.