Stupidly easy - trace source to debug output inunit test...
I'm convinced that this is stupidly easy, but I cant figure it out...
I have a class with "TraceSource "classname" and in debugging it work fine, I see the output in the "output" window, however when running unittests I only see "debug.Write" output...
What am I missing... do I need to add a listener route or something?!
- sure I'm noJedi but that's no reason to stop trying to make stuff levitate! -
to clarify...this UnitTest:
[TestMethod()]
public void TestLogging()
System.Diagnostics.Debug.WriteLine("this is a debug writeline");
System.Diagnostics.Trace.WriteLine("this is a Trace writeline");
var ts = new System.Diagnostics.TraceSource("classname");
ts.TraceInformation("this is a ts.TraceInformation");
throw new AssertInconclusiveException();
outputs this:
Test Name: TestLogging
Test Outcome: Skipped
Result Message: Exception of type 'Microsoft.VisualStudio.TestTools.UnitTesting.AssertInconclusiveException' was thrown.
Result StandardOutput:
Debug Trace:
this is a debug writeline
this is a Trace writeline
Now... for SOME reason, THIS is NOT outputing to the DebugOutput either... when I step through the TEST...
however stepping through code NOT in unit test does put stuff in the debug output window...
What am I missing... why is the TraceSource not outputting... I can see in step through that the DefaultTraceListener is there (its the only listener) and I was under the impression that it directed output to the DebugOut output stream... is this not what
I think it is...?!
Hi Jack,
I think you are correct in that my expectations were wrong.
1) stepping through "SwitchLevel" is "Off", in the unit test, which is problematic.
turning it on (to All) starts logging, but ONLY when I manually add a CONSOLETraceListener (and set the route to debug error stream to true)
2) the doco you've pointed me at was what I was reading, but I think I read/misread it differently than you...
I think its this that threw me:
•A DefaultTraceListener emits Write and WriteLine messages to the OutputDebugString and to the Debugger.Log method. In Visual Studio, this causes the debugging messages to appear in the Output window. Fail and failed Assert messages also emit to the OutputDebugString Windows API and the Debugger.Log method, and also cause a message box to be displayed. This behavior is the default behavior for Debug and Trace messages, because DefaultTraceListener is automatically included in every Listeners collection and is the only listener automatically included.
to my thinking this means that by default a "Default -> aka Debug (when DEBUGGGING)" is created for you always, and therefore in the ABSENCE of config stuff, this would be perfect for UNITTESTING - therefore TraceSource with nothing but a name
should effectively produce the same output as "Debug.WriteLine"...
that was my thinking, but it looks like even with 'SourceLevel.All" you still need to fiddle with it...
Thanks for your input, for now, I've resolved this by adding the above stuff so that my existing TraceSources are at least outputting stuff in my tests so I can see more of what is going on without having to change my "TraceSource" calls to "Debug"
calls everywhere.
- sure I'm noJedi but that's no reason to stop trying to make stuff levitate! -
Similar Messages
-
Cisco 1310 Roam Reason (Debug Output Possible?)
I have some 1310s. One is in WGB mode. It roams between the other Access Points that are in LAP mode.
What I need to know is if there is a way to debug WHY the WGB roams. Is there a debug that I can apply that will output the reason for the roam? Usually it would be due to signal level change but there are other reasons as well.
Hopefully this is an easy one. I keep alternating between associated access points and I can't figure out why.
I have figured out that I can put the bridge in Install Mode to get an output of the RSSI level of the associated AP, but this does not tell my WHY the roam took place.
Thanks!
JamesHi James,
Here is the show command which will tel us about the roam history.. But not a debugging output though..
show client roam-history
>> As such there is no debug that give us just the Roam details.. Debug client will provide very good info..
>> I think we can manually set the channel on that LWAPP to something so that the WGB will associate to that.. or if the TX power iscausing the issue, then playing around with the TX power on the LWAPP may help us.
Regards
Surendra -
Hey,
I am creating XML and the debug output generated by
coldfusion is causing an error. I tried putting <cfsetting
showdebugoutput="no"> at the top of my page and the error was
still popping up. I then called up my server host and had them
manually turn off the debut output, and the error was still showing
up.
The obvious question is how do I know that the error is
caused by Coldfusion debug output...behold the hideousness that, to
my knowledge, is exclusively from that output
So two questions arise:
1) Can this output be caused by any other source? (and I've
already checked all my data being inputted into the XML)
2) What can I do to get rid of this output
Thanksthe proper attribute is actually showdebugoutput, not
displaydebugoutput
also check your application.cfm/cfc and make sure it is not
outputting
anything that will be added to the request...
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/ -
Problem sending debug output to a syslog server
Hi,
i am having a problem when a tried to send the output from a debug command to my syslog server with the logging debug-trace command.
I already have a syslog server getting all the notification level logs from my ASA cluster.
When i enter the command debug fover fail, i can see on the terminal session all theoputput m,essgaes from that commnad, but when i type debug-trace, the debug messages disappear from monitor and they aren´t redirect to my syslog server. I analyze the traffic arriving to my syslog server with tcpdump, and the messages from the debug command are not being send to the syslog server.
I should say i also have a netflow collector active.
I attached the sh run logging output, maybe it can help:
logging enable
logging timestamp
logging standby
logging buffer-size 8096
logging monitor errors
logging buffered warnings
logging trap notifications
logging asdm errors
logging mail alerts
logging from-address xxxxxxx
logging recipient-address xxxxxxx level alerts
logging facility 16
logging host ADAM-MANAG 192.168.50.8
logging debug-trace
logging permit-hostdown
Could someone help me with this?
Thanks in advanceHi Gurpreet,
thank you very much for your reply.
When i enter the command logging trap debugging and logging debug-trace , I can see in my syslog server messages with the tag 711001 coming from the debug fover fail command, but I also get a bunch of other information i don´t want (all the debug level messages).
As far as I know, the debug-trace command redirect just the debug output from commands that you specifically enter in order to trace and debug a problem, but this is not the case, in order to make this work i have to enable the debugging trap level.
Is it something I am doing wrong , or I misunderstand?
Regards, -
Debugging output not appearing
I recently absorbed the task of supporting our CF MX 6.1
server. We have an app that we need to debug - the developer asked
us to add her IP address to the "Debugging IP Addresses" list. I
turned on debugging and added her IP address to the list, but
debugging output is not displaying; this is true even when you run
the CF app on the server running CF. The steps I took are as
follows:
- In CF Administrator, checked Enable Robust Exception
Information and Enable Debugging. Submitted changes and got msg
Server has been updated successfully.
- Added developer's IP address to the list of debugging IP
addresses. She couldn't see the debug output. Neither could I.
- Restarted CF server. No change.
- Rebooted server box. No change.
- Tried removing all IP addresses from list. Debugging input
then shows for everyone.
One thing of note regarding the setup of the server is that
IE has "Internet Explorer Enhanced Security Configuration" enabled
- don't know if this would have any impact. I'd also tried adding
the local IP address of my machine (I'm on the same LAN as the
server), and I got no debug info on my machine. Our whole LAN,
including the CF Server's box, is behind an ISA server, but of
course that wouldn't have any impact on the local server, and I
don't *think* it would affect machines on the LAN, but I'm not
certain of this.
Showing the debug info to everyone is not an option, so we
need to get the IP address filtering working. I've looked at the
Windows event logs, the CF logs, and these forums, and can't find
any helpful info.
Server config:
Windows Server 2003 (Standard Ed.) SP1
ColdFusion MX 6.1 (6,1,0,63958) Standard
Any suggestions would be very much appreciated.I figured out the problem - it turns out that even our LAN
traffic goes through our ISA server, and the ISA server passes its
IP address to IIS, so CFMX is seeing all traffic as coming from the
same IP address - the LAN address of the ISA server. Adding that
turned it on for everyone, so it seems that the solution lies in
changing the config of the ISA server to pass through IP addresses.
See post by "Smiley Dave" titled "Debug IP Addresses" for a little
more info, though there's no info in that thread that he ever
actually got it working. -
Enabling trace file in Debug mode
Hi all
how to enable the trace file in debug mode,...
can any one help me in this,...Hi,
answered in your second thread on this. *g
Regards,
Heike -
How to turn of debug output from the jdriver for Oracle
We are running our builds with Ant and doing unit-tests with junit/cactus.
The Weblogic jDriver produces what appears to be debug info on standard out which
in turn is captured by junit in xml files reporting errors etc. The problem is that
the WebLogic driver ( WL6.1 SP2) sometimes produces binary 0's ( see below) ending
up in the result xml files, and that Ant's result xml parser cannot handle - (nor
should it ).
This is probably a bug in the c-code for the jdriver , the oci dll ?
Would much appreciate how to turn off the debug(?) logging that the jDriver does:
looks like this (look for the string "[6 binary 0's]"):
Parsing: select length(SYSDATE) from dual
Executing: select length(SYSDATE) from dual
Parsing: select VALUE from V$NLS_PARAMETERS where PARAMETER='NLS_NUMERIC_CHARACTERS'
Executing: select VALUE from V$NLS_PARAMETERS where PARAMETER='NLS_NUMERIC_CHARACTERS'
Done logging in at: 60
Connection: using OCI API: OCI8[6 binary 0's]
Connection successfully established via plain JDBC
DriverManager.getDriver("jdbc:weblogic:oracle:LSS_DBSVC_DEV_autobuild")
trying driver[className=weblogic.jdbc.oci.Driver,weblogic.jdbc.oci.Driver@3383e9]
getDriver returning driver[className=weblogic.jdbc.oci.Driver,weblogic.jdbc.oci.Driver@3383e9]Hi Gunnar,
I'd check your code for appearances of "DriverManager.setLogWriter" that set
log writer to System.out. This is the way to get driver's debug output
to standard out.
Regards,
Slava Imeshev
"Gunnar Skogen" <[email protected]> wrote in message
news:3d2972bb$[email protected]..
>
We are running our builds with Ant and doing unit-tests with junit/cactus.
The Weblogic jDriver produces what appears to be debug info on standardout which
in turn is captured by junit in xml files reporting errors etc. Theproblem is that
the WebLogic driver ( WL6.1 SP2) sometimes produces binary 0's ( seebelow) ending
up in the result xml files, and that Ant's result xml parser cannothandle - (nor
should it ).
This is probably a bug in the c-code for the jdriver , the oci dll ?
Would much appreciate how to turn off the debug(?) logging that thejDriver does:
looks like this (look for the string "[6 binary 0's]"):
Parsing: select length(SYSDATE) from dual
Executing: select length(SYSDATE) from dual
Parsing: select VALUE from V$NLS_PARAMETERS wherePARAMETER='NLS_NUMERIC_CHARACTERS'
Executing: select VALUE from V$NLS_PARAMETERS wherePARAMETER='NLS_NUMERIC_CHARACTERS'
Done logging in at: 60
Connection: using OCI API: OCI8[6 binary 0's]
Connection successfully established via plain JDBC
DriverManager.getDriver("jdbc:weblogic:oracle:LSS_DBSVC_DEV_autobuild")
tryingdriver[className=weblogic.jdbc.oci.Driver,weblogic.jdbc.oci.Driver@3383e9]
getDriver returningdriver[className=weblogic.jdbc.oci.Driver,weblogic.jdbc.oci.Driver@3383e9]
>
> -
Filtering debug output from CUBE
Hi all
I'm trying to filter the output of the debug command "debug ccsip messages"
This is my reference
http://docwiki.cisco.com/wiki/Cisco_IOS_Voice_Troubleshooting_and_Monitoring_--_SIP_Debug_Output_Filtering_Support
This is what I've done:
---snip--
TR-47-0005.NEV#sh call filter match-list 1
outgoing called-number XXXXXXXX
debug condition match-list is set to EXACT_MATCH
TR-47-0005.NEV#term mon
TR-47-0005.NEV#sh debugging
CCSIP SPI: SIP Call Message tracing is enabled (filter is ON)
TR-47-0005.NEV#
--snip--
It still gives me full debug output. Weather I go for "incoming called-number", "incoming calling-number", "outgoing called-number", "outgoing calling-number" or if I set the debug condition to "partial_match".
Why is that?
CUBE: 3945G
IOS: c3900-universalk9-mz.SPA.152-4.M1.bin
/TonyI have same problem, but only explanation I can find for this behavior is this:
"Some debug output generated during a call may not have GUID information. These debugs, represented by /xxxxxxxxxxxx/ characters in the debug header, are not filtered and always appear."
From my output there are lot of calls that have no GUID, even some calls that have GUID but NOT match condition appears in debug... Some people reported that they managed to work with diferent IOS, but for me it never worked on 3-4 versions of firmware.
For me, best alternative for filtering is to use http://translatorx.cisco.com/
Veselin -
Keyboard Manager (under Windows XP) spamming System Debug Output
When running Windows XP, the Boot Camp keyboard manager (kbdmgr.exe) spams the system debug output every 500 ms with a message like "0.620690".
This is inconvenient for a developer. Often I need to check out debug output in order to accomplish some task. But as soon as I start a Debug viewer application it gets flooded with that kbdmgr messages. That is more an annoyance than a problem.
Is there a way to tell Keyboard Manager to start and remain silent?Yes, running the 2.1 drivers. KbdMgr.exe says it is 2.0.2.44 (exe version/build number) and Boot Camp systray app says it is 2.1 Build 210A12. Took another screenshot showing these version numbers:
http://picasaweb.google.com/rholdorf/BootCamp/photo#5219317221537472034
Yes, you are right. I am filtering out those messages. The sad side is that I have to do that once each boot. And I did that so many times that I got really annoyed. -
I installed the CFMX 8 Dev Edition, enabled the debug output,
but the output is not displayed. I can access the web pages, but
can not see the debuh output.
Any ideas on how to fix this?Jonathon,
Try removing all of the Debugging IP Addresses
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com
"JonathanFLKeys" <[email protected]> wrote
in message
news:fmocnl$83d$[email protected]..
> I'm having the same problem - the debug text just
doesn't show up. i've
> tried
> putting 127.0.0.1 in obviously, as well as no IP, and
the static IP of
> this PC.
> I've been using CF since 4.0, so it's not like i haven't
done this a
> billion
> times. i'm not excited about reinstalling CF8 to fix it.
It's working
> correctly
> on another public webserver of ours. we haven't
installed a SP to CF8 (is
> one
> available yet?)
>
> any ideas on a work-around?
>
>
> thanks
> Jonathan
> -
No debug output displayed on 3745 while SSH or Telnet
IOS 12.3(4)T4 on 3745.
While Telnet, SSH or console into router we see no debug output even after turning Terminal monitor, we can only see the show outputs, etc. While consoled into the 3745 we see nothing there is No prompt or any messages at all.
We tried replacing the console cable and placed it on different PCs or laptop still no go. I was thinking of reloading the router tomorrow night, but want to check if anyone has come across this problem. It was all working in the past without any changes.
Is there like a command i need to add, etc. But i am 100% sure its all good on the 3745.
Cheers!
-YavuzTry 'logging console'
'sh logg' will show what is currently being logged, look for this line to see what is being logged to the console:
Console logging: level debugging, 49 messages logged, xml disabled, filtering disabled
Hope this helps -
Hi,
I am having follwoingg output of debug ISDN commands. I am same output for many routers. ( unfound b cahnnel).
What could be the reason ? It is unable to bring up the interface. It doesnt seem to be IOS problem as same IOS is working at other places. Can it be a problem with Service provider some settings in ISDN switch ?
Debug output is
ISDN BR0 EVENT: process_rxstate: ces/callid 1/0x8008 calltype 1 HOST_DISCONNECT_ACK Nov 19 09:07:14 CET: ISDN BR0 **ERROR**: host_disconnect_ack: Unfound B-channel on Disconnect_Ack call id 0x8008.
Thanks in advanceHey ,
Here are the codes for disconnect . Becoz i dont see ur complete output after ping + debug q931 -- kindly check the code in the following link.
if more help needed ..paste the above mentioned + sh isdn status.
Suspect a Telco issue. <<
http://www.cisco.com/warp/public/129/isdn_disc_code.html#
rate the post if helps .... -
Recurring CFMX 7.02 debug output
Hi,
I'm trying some stuff with CFMX - got some knowledge with CF
5.0. When I save the *.cfm site and try it in a brower everything
is fine if I do not have an error (e.g. misspelling CF command like
XMLElementNew). But... if I have a syntax mistake I got a big error
message (as expected). When I correct the error in the cfm-file and
retry within... 2 or 3 minutes... I get exactly the same error
message with exactly the same debugging output... When I alter the
page and have no "syntax mistake" all changes are shown by the next
browser refresh...
Is there something I can do to elemenate this "error
caching?". It is very annoeing and blocking my debug and
development process. I have no big experiances with CFMX Admin (I
know how to add a database and set a Debug-IP... that's it). Does
somebody know about this "problem?". I have no clew...
thanks
MichaelChances are you have the Admin set to cache files - go
through the settings and turn off caching. Also, if you use MSIE,
do not use "automatic" browser caching either, especially as a
developer - since this will generally result in always pulling a
cached file. -
Capturing debug output of javamail
Does anyone know how to capture the debug output if debug is set to "true".
I really need to know this info.
Thanks in advance.It either goes to sysout or syserr. Whichever it is, redirect that to whatever it is you want to capture with.
-
Is any source level debugging available for Solaris 2.8? Does anyone actually have ksld working, or does Sun not support it anymore because it doesn't work? I have been happily using kgdb for many years on 2.6,but now have been forced to upgrade to 2.8,and there doesn't seem to be anything available. If anyone has ksld working and would be able to send me a copy, please reply
KSLD did work at one time with Solaris 8. I don't know about its current status. I no longer see it listed at http://soldc.sun.com/developer/support/driver/tools/tools.html, so that is not a good sign.
KSLD was developed by a group outside the regular Solaris kernel group and without proper architectural oversight. Other debugger development groups also exist with different ideas about what is desirable in a kernel debugger. This resulted in friction between various groups. My guess would be that KSLD is not supported at this time and may or may not be coming back.
Richard
Maybe you are looking for
-
How do I use a Flex swc in Flash CS3?
My engineering team has used Flex to create a nice little swc for me to use inside of Flash CS3, but now I'm having trouble finding any documentation on how to actually import it. Placing it in the Components folder doesn't work, as it's not recogniz
-
How to save picture in a text to camera roll in ios7
How do I save a picture that was text to me to camera roll in IOS7?
-
DISPLAY SPATIAL DATA USING JDBC ON A JAVA FRAME
I am trying to set up some spatial data and need help in getting some sample code for displaying the data on a Java Frame using JDBC. The shapes I am setting up are simple polygons, lines, circles. I was going through the samples in the demo director
-
How to save/load player stats?
Okay..this should be my last for a while. The last thing I need to know is how to be able to save/load player stats. I'm working on an RPG and need to know how to create a save file with the players hp, mp, lvl, weapons, and so on, and then be able t
-
Change input quantity of a production order in SAP - PP
Hello, I am working in a custom code where one of the steps is to create production orders basically based on a product, workcentre and quantity for what I use 'COXT_BAPI_ORDER_CREATE' function module. Now I have a new requirement which is to be able