Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Fix Span Debugger Display String to correctly show the string contents #27338

Merged
merged 1 commit into from
Feb 22, 2018

Conversation

ahsonkhan
Copy link
Member

@ahsonkhan ahsonkhan commented Feb 21, 2018

@pakrym
Copy link

pakrym commented Feb 21, 2018

How does it look in vs for char vs byte?

Copy link
Member

@khellang khellang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, given it looks good in VS, as @pakrym mentioned 👍

@@ -23,7 +23,7 @@ namespace System
/// or native memory, or to memory allocated on the stack. It is type- and memory-safe.
/// </summary>
[DebuggerTypeProxy(typeof(SpanDebugView<>))]
[DebuggerDisplay("{DebuggerDisplay,nq}")]
[DebuggerDisplay("{ToString(),raw}")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default I thought VS rendered most things with ToString(). I could be wrong, but what happens if you remove the DebuggerDisplay attribute entirely?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
This happens (special characters are not escaped)

Copy link
Member Author

@ahsonkhan ahsonkhan Feb 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't have it, we end up with the issue mentioned here: #26726 (comment)

image

With this change (i.e., specifying "raw"), we get the expected result.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. Thanks.

@ahsonkhan
Copy link
Member Author

How does it look in vs for char vs byte?

image

image

@khellang
Copy link
Member

What if you try with "\r\b\0" as in the original issue?

@ahsonkhan
Copy link
Member Author

What if you try with "\r\b\0" as in the original issue?

See #27338 (comment)

@ahsonkhan
Copy link
Member Author

ahsonkhan commented Feb 21, 2018

System.Net.Requests.Tests failing on Ubuntu.1604.Amd64.Open:Release-x64 with seg fault:

https://mc.dot.net/#/user/ahsonkhan/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/fd25d3cb8fc8054d5cdc118b24e50a0f931782e0/workItem/System.Net.Requests.Tests/wilogs

2018-02-21 22:08:53,266: INFO: proc(54): run_and_log_output: Output:    System.Net.Tests.FtpWebRequestTest.Ftp_AppendFile [SKIP]
2018-02-21 22:08:53,266: INFO: proc(54): run_and_log_output: Output:       Condition(s) not met: \"LocalServerAvailable\"
2018-02-21 22:08:54,630: INFO: proc(54): run_and_log_output: Output: /home/helixbot/dotnetbuild/work/96d5d89c-3b8b-4afb-9beb-f43b108fdc9f/Work/01a7818b-79e2-43b9-9067-47e346b87957/Unzip/RunTests.sh: line 88: 69406 Segmentation fault      (core dumped) $RUNTIME_PATH/dotnet xunit.console.netcore.exe System.Net.Requests.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=nonnetcoreapptests -notrait category=nonlinuxtests -notrait category=OuterLoop -notrait category=failing
2018-02-21 22:08:54,675: INFO: proc(54): run_and_log_output: Output: Dumpling has not been installed yet. Please run "DumplingHelper.py install_dumpling" before collect_dumps.
2018-02-21 22:08:54,679: INFO: proc(54): run_and_log_output: Output: ~/dotnetbuild/work/96d5d89c-3b8b-4afb-9beb-f43b108fdc9f/Work/01a7818b-79e2-43b9-9067-47e346b87957/Unzip
2018-02-21 22:08:54,680: INFO: proc(54): run_and_log_output: Output: ----- end 22:08:54 ----- exit code 139 ----------------------------------------------------------
2018-02-21 22:08:54,682: INFO: proc(54): run_and_log_output: Output: Unable to find executable corerun
2018-02-21 22:08:54,744: INFO: proc(58): run_and_log_output: Exit Code: 139
2018-02-21 22:08:54,745: ERROR: scriptrunner(91): _main: Error: No exception thrown, but XUnit results not created
2018-02-21 22:08:54,745: ERROR: helix_test_execution(83): report_error: Error running xunit None

cc @davidsh, @Priya91, @wfurt, @geoffkizer

@ahsonkhan
Copy link
Member Author

@dotnet-bot test Linux x64 Release Build

@ahsonkhan
Copy link
Member Author

The Tizen build timed out:
https://ci.dot.net/job/dotnet_corefx/job/master/job/tizen_armel_cross_debug_prtest/12381/

Build timed out (after 120 minutes). Marking the build as aborted.
15:26:13 
Build was aborted

cc @dotnet/dnceng, any ideas why?

@dotnet-bot test Tizen armel Debug Build

@Chrisboh
Copy link
Member

@ahsonkhan You will need to reach out to the Tizen folks as they are the owners of those legs. I am not sure who specifically that is but @RussKeldorph I believe knows.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants