简体   繁体   中英

View parameter values while debugging with method call of many parameters?

Let's say I'm degugging code and I reach a breakpoint where the line of code is something like this:

GetEmpInfo(empName, empLast, empSS, empDept, empBirth, empCity, empState, 
empCountry, parm1, moreparms, evenmore, toomanyparms);

Is there a way to know what value each of those parameters has without going through each variable? I know there has to be a way; I just don't know where it is.

Thanks.

You can use the DebuggerDisplay Attribute

 [DebuggerDisplay("{Param1} {Param1} {Param1}")]

And when you hover over the object you will see the values that are entered above

There are 7 good ways to do it -

1. Data Tip
2. Autos Window
3. Locals Window
4. Watch Window
5. Quick Watch Window
6. Parallel Watch Window
7. Immediate Window

Check this for more info

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM