|IRC Nick||Time (GMT-7)||Message|
|kou||10:04||hi~ anyone here?|
we're all gone
|jshanab_wcw||13:04||I am trying to debug my plugin with some 3rd party tools and starting FF in the tool is ...counter productive. Is there a simple container that we could load our plugin into to excersize it?|
|taxilian||13:04||unfortunately not that I know of|
|jshanab_wcw||13:04||It was just a thought :-) I am trying to run a memory leak detector|
|taxilian||13:04||yeah, it's a problem and no mistake
it's possible to get useful info still, just harder
|jshanab_wcw||13:04||I have one very nice anaylsis tool but it ONLY starts thru the debug system. I have to set up the project to start the browser with the web page, but it rarely makes it to the plugin.
It does not let me "attach" or begin collection when it finds a macro in the code.
|taxilian||13:04||did you disable the crash handler in firefox?
and disable ipc mode?
|jshanab_wcw||13:04||Yes, It is the Intel Parralells suite that only works thru the debug properties of the project :-(|
you could always write your own NPAPI host =]
|jshanab_wcw||13:04||I was looking at the 4part ColPanic articel and thinking just that...
|taxilian||13:04||NPAPIHost in the repo is intended to be just that
never heard of mozmill
interesting. no idea
|jshanab_wcw||13:04||that and UxU are plugins in the browser, I want to get the browser out of the way. Maybe that is too much to ask|
|taxilian||13:04||I have long wanted to make a npapi host for about the same reasons
also because then you could get really nice logging and other debugging stuff from the browser's perspective
|sumeet||14:04||@taxilian: I found out why I wasn't seeing any logs in either the browser's console or my output logfile. The reason is, that the Win32DebugAppender gets the log messages and sends them to the debug output window in VS 2010 Express. The FileAppender or ConsoleAppender are not being invoked. In fact, my getLoggingMethods method in Factory.cpp does not seem to be invoked at all. Am I missing some build params?|
|taxilian||14:04||sumeet if FileAppender isn't getting invoked then you didn't configure the logger correctly|
|sumeet||15:04||Thanks Richard. Now I'll look for instructions on how to configure the logger (I haven't seen any so far).|
|taxilian||15:04||search it for "logging"
there are a couple of methods on FactoryBase that you'll need to override in your plugin
in your plugin's factory class
|sumeet||15:04||I did that.|
|taxilian||15:04||aparently not correctly =]|
|sumeet||15:04||and set breakpoints there - they're not being invoked.|
|FireBreathBot||15:04||When you need to share code, logs, or anything else longer than a couple of lines, use a pastebin. http://fpaste.org, https://pzt.me/, and https://gist.github.com are all good options|
|taxilian||15:04||pastebin me the code you're using|
|sumeet||15:04||possible. I just cut-paste the code in the wiki.
|taxilian||15:04||also are you certain you've attached to the correct process? if you haven't, your breakpoints won't be caught|
|jshanab_wcw||15:04||Visual Studio is pick about breakpoints are they red or hollow yellow.?|
|taxilian||15:04||? red or hollow red; never seen hollow yellow|
|jshanab_wcw||15:04||HUmm, never saw hallow red on VS2010 Premium|
|sumeet||15:04||I can break at other places just fine.|
|taxilian||15:04||sumeet: okay. pastebin me your factory.cpp file|
|sumeet||15:04||My breakpoints are all solid red :)|
|taxilian||15:04||and/or .h (is there a .h? I forget)|
|sumeet||15:04||in a moment ...
in a moment
|jshanab_wcw||15:04||If it is solid red and you are not hitting it then the logic does not take you there... but there is a path to the code.|
|sumeet||15:04||yeah, that's what I figured.|
|taxilian||15:04||sumeet: you've done the add_firebreath_library(log4cplus) in your PluginConfig and then reprepped, right?|
|sumeet||15:04||yes, I put it at the end of the file though.
Here's the gist url: git://gist.github.com/2562695.git
|taxilian||15:04||what version of FireBreath are you using?|
|taxilian||15:04||hmm. try deleting your build directory and recreating
you're sure you aren't just attaching the debugger after those functions have been called?
re-prepping, I mean, not recreating
|sumeet||15:04||That could be.|
|taxilian||15:04||are you attaching using the startup dialog?
or waiting 'til it's loaded?
|sumeet||15:04||Not sure what you mean (I'm a unix programmer).|
|taxilian||15:04||you'd know if you were using the plugin startup dialog =]|
|sumeet||15:04||I attach using the Debug menu after loading the plugin. Then I reload the page that had the plugin.|
|taxilian||15:04||is this on windows or linux?|
|sumeet||15:04||Sorry, I'm not familiar with windows programming....|
|taxilian||15:04||hmm; that may or may not create a new process for the plugin|
|sumeet||15:04||This is WIndows 7 Professional|
|taxilian||15:04||there is a command-line argument you can use with chrome that will cause it to pop up a dialog box with the pid the plugin will be under on startup|
|sumeet||15:04||Actually, the fact that is undisputable is that my log messages show up in the VS debug-output window.
Oh, I see. I just attach to *all* chrome processes.
|taxilian||15:04||you may be attaching too late, though|
|sumeet||15:04||I put breakpoints inside the Win32DebugAppender and I do successfully break there....
Agreed that I maybe attaching too late.
So the only thing I can say unequivocally is that the FileAppender is not being invoked.
And the Win32Appender is being invoked.
|taxilian||15:04||most likely you can't log to "plugin.log" since you don't know what your CWD is and it's probably not somewhere you're allowed to write
so it's probably trying to create the fileappender and failing
|sumeet||15:04||I tried with C:\Dev\plugin.log - that didn't work either.|
|taxilian||15:04||of course it won't; you can't write to that either
you're in a user-mode process
you're generally only allowed to write to your user profile directory
|taxilian||15:04||anywhere else generally requires administrative access|
|sumeet||15:04||Oh - shows how dumb I am about windows.|
|taxilian||15:04||it's not that different from unix|
|sumeet||15:04||I'll try C:\Users\sumeet next.|
|taxilian||15:04||unix as a general rule you can write to your home dir, outside there you've got a problem|
|sumeet||15:04||Okay, in that case I'm generally dumb :)
|taxilian||15:04||that's not to say that you can't mess around with the perms elsewhere on both platforms, but as a general rule...
|sumeet||15:04||Okay, I'll follow the guidance there. But other than that, am I incorrect in expecting the messages to show up in my Chrome Console?|
it will not show up in your browser's console
|sumeet||15:04||Does Log_Console refer to some other console?|
|taxilian||15:04||you can use htmlLog on the browserhost to log to there, but it's got some performance implications
yes; the console on mac/linux is the system console, on windows it's the debug console that you'd get from visual studio or there are a few other ways
|sumeet||15:04||I see. What does LogMethod_Console refer to?
|taxilian||15:04||actually, if you were able to run the browser so that you had a terminal connected (a console session) you'd see it there as well|
Thanks a bunch for your help...
|sumeet||15:04||I'll read the link you sent me and hope to log to a file...|
|taxilian||15:04||=] I promise it works… I use it all the time =]|
|sumeet||15:04||that's good to know.|
|sumeet_||15:04||Richard - your hunch was right. I see the file now that I specify a location within my homedir. (another interesting thing I noticed is that I supplied forward slashes in the filepath and that works - is this boost::filesystem at work?)|
|taxilian||15:04||probably just a feature of log4cplus
though boost::filesystem is probably also capable of handling that
|sumeet_||15:04||cool. Thanks again. Now I can get to coding my business logic.|