Audience Question:
Q: When will the Console bug with Chrome be fixed?
A: Not sure, others may know, but I recommend monitoring this page: https://success.salesforce.com/issues_view?id=a1p30000000SusxAAC
A: We have a patch that should fix the issue. We are trying to get it out as soon as possible.
Audience Question:
Q: Man times I enter some code in the Console code window (Execute Anonymous Window) and execute the code. When I switch Workspace and come back the code is there sometime and manytimes it is not. How can I ensure that the code snippet is remembered. I have tried different things and nothing seems consistant.
A: I've not experienced this, but you must execute the code, not just close the window, in order to save the state of the code you write in the exec anonymous window.
A: To explain this a little bit more, Execute Anonymouos code is remembered when you execute on the workspace. So for example, if you type code, but don't execute it, it will not be remembered. If you switch your workspace, you will be working on a NEW execute anonymous "scratchpad"
Audience Question:
Q: why cant we use static keyword in developer console
A: I think you are refering to a rule about Anonymous Apex: "User-defined methods cannot include the keyword static."?
Audience Question:
Q: What are the best settings for the log levels (each DB, Apex Code, etc) that will allow me to see System.debug statements and the end LIMITS without hitting log limits?
A: There's no right answer to that question. It totally depends on your code and the tests that exercise it.
Audience Question:
Q: How can I fire queries or DB stmts from the console but don't want the changes to be committed?
A: the only way you can fire and not get committed to DB is by using DML statements between Test.startTest and Test.stopTest so you have write test classes to get that done
Audience Question:
Q: Does that mean I cannot write/execute tests from the execute anon in the console?
A: No. This is not possible. Test methods are static. Execute anonymous does not support the declaration of static members directly within the exec anon window so you can't declare a test method/class there. There is no "command line" version of launching tests from the console. You must do it from the tests tab.
Audience Question:
Q: How can I fire queries or DB stmts from the console but don't want the changes to be committed?
A: You may want to experiment with using Database.rollback() at the end of that transaction.
Audience Question:
Q: Anything on the roadmap for asyncrhonous tests via Ant / Migration Toolkit?
A: Interesting question - not sure if the new Tooling API will give you that capability, but it may. I'll be as interested as you to hear what Josh says about that upcoming feature.
Audience Question:
Q: Does Running All Tests on an org cause it to slow down if not lock up?
A: It should not, the tests are running asynchronously in the background, and remember, you are running on a multi-tenant application server.
Audience Question:
Q: How does version control fit into the scheme of things, if the move is away from the IDE and towards the Developer Console ? (The IDE has plugins for SVN, etc so that code can be checked into version control - which is becoming increasingly needed as Enterprise Development comes to the Force.com platform)
A: Investment in web-based tools (Developer Console) does not preclude investment in client tools (IDE)
A: The plan is to open source the IDE and move to the Tooling API while building out the developer console. With that said, we are aways aware of version control have plans to address the issue.
Audience Question:
Q: Is there a way to export that stack trace or execution log from console to outside or view it in a IDE or logger kind of env?
A: You can download the log file. It can then be opened in any client tool. I frequently use Mac Console myself to look at downloaded logs.
Audience Question:
Q: When I was using the developer console about a month ago. It crashed so often and closed the whole console. I was using Mozilla. Is this known and has this been addressed?
A: Use mozilla latest edition to avoid your issue.
Audience Question:
Q: Are you showing if we are about to cross execution limits in developer console?
A: Logs report limit usage at the end of execution code units, as do tests. Set the "Profiling" log category to Finest to get the most information possible.
Audience Question:
Q: What when the log is too much? I often just want the call stack without having to load the whole log
A: One feature that may help you in that regard - you have the ability to override log level on a per class or trigger basis. That way you can turn down over log levels, but turn up log levels for specific classes/triggers.
Audience Question:
Q: When I hover over my code I see an underline then when I right click I have a sub-menu option Inspect Element. is this a function of SF or just the browser?
A: Some of the User Defined symbols (methods, classes, and variables) are underlined in the developer console. If you click on the word and press the Go To button, or via a short cut, it attempts ot navigate to that class, method, or variable. There is not a context menu option for Go To, yet.
Audience Question:
Q: When I hover over my code I see an underline then when I right click I have a sub-menu option Inspect Element. is this a function of SF or just the browser?
A: Both. The "Inspect Element" menu item is a browser feature. The underline allows you to view source of the item you have hovered over, but you must use the GoTo button in the console. This will take you to where that variable/method/class is declared.
Audience Question:
Q: Is there a System/server log where I can write stuff to while executing code? similar to a JVM app log. Can I peek at this log if it exists?
A: One thing to consider doing is creating a custom object with textarea fields - write your messages there. People often do that from catch blocks to enable an "always on logging" capability.
Audience Question:
Q: How to test custom settings value without seealldata?
A: You should generate custom setting data as part of your test. Either load it from a static resource, or have the code generate the custom setting value. Arguably, your tests should attempt several custom setting variations so that you can validate that it will work based on different setting configs.
Audience Question:
Q: Sometimes my log files will not open because they take too long to load. What's up with that?
A: Are you using Chrome? There is a known issue with Chomre 25 related to rendering. If they still do not load, you can open them in raw log mode, download the log, or minimize the panels you have open.
Audience Question:
Q: Sometimes my log files will not open because they take too long to load. What's up with that?
A: I have had this happen, too. Try downloading the raw log in this instance
Audience Question:
Q: How do lists display in that Variables panel? Can we navigate through Lists and Maps?
A: List and maps just show the address in the variables panel. To navigate through the collections, take a heap dump!
Audience Question:
Q: How much of what is being displayed is available now? It is a little confusing as to what is preview and what is current.
A: Sorry Mike, hard to say, most of the functionality being shown is available now, but Josh is showing some new features that will probably (safe harbor) be enabled in an upcoming release.
Audience Question:
Q: How to take a heap dump?
A: He just showed that. We call them checkpoints now.
Audience Question:
Q: Is there a key or glossary to those event names & other log terms anywhere?
A: These are documented in the Apex Code developer's guide: http://www.salesforce.com/us/developer/docs/apexcode/Content/code_setting_debug_log_levels.htm
Audience Question:
Q: Is the checkpoint a new one?
A: It's what we used to call heap dump.
Audience Question:
Q: How to take a heap dump?
A: Crank up Apex Code and Apex Profiling log levels to Finest, then enable debug log captures for that user. You can also set watchpoints to inspect variable values.
Audience Question:
Q: Are these question and answers logged or saved somewhere? Will they be available after webinar?
A: Yep. We'll email you with links.
Audience Question:
Q: Are these question and answers logged or saved somewhere? Will they be available after webinar?
A: We will be posting the Q&A with the recording.
Audience Question:
Q: How do I cover the catch portion from try-catch in my test class? Any example?
A: Pass bad data. E.g. let's say you catch a DML exception in your trigger that may fail due to a Validation Rule. Make sure your mock data meets the rules of your validation rule.
Audience Question:
Q: This is all being shown while running tests. How do you do all this in real time e.g when data is being loaded using Data Loader?
A: In that case, enable Debug Log monitoring for the user who is logged in via Data Loader.
Audience Question:
Q: But how do you catch Limit errors?
A: Limits exceptions are uncatchable.
Audience Question:
Q: How do I cover the catch portion from try-catch in my test class? Any example?
A: You need to create the condition that throws the exception. If the exception is rethrown, then you need to catch the exception in your test. The exception data can be used to assert that the correct exception was thrown.
Audience Question:
Q: Can you give me a link or example for testing the catch part?
A: Puneet, I recommend you take a look at my recorded Dreamforce presentation, on YouTube: http://www.youtube.com/watch?v=wH2_dCpvd9Q
Audience Question:
Q: whats the best way to change code and move it into production
A: For small changes, change sets are sufficient. For larger projects and orgs, I would suggest deploying using the Force.com migration tool or IDE.
Audience Question:
Q: Will you be able to access the Checkpoints from Force.com IDE?
A: Probably not, although the new Tooling API may make that possible (safe harbor). As a cloud computing company, we are putting a lot of effort into the browser based tools (like Dev. Console).
Audience Question:
Q: are there different versions of developer console. The layout of my console is very different... It is a tab layout versus drop down and I don't think I can access al l the menu items in the drop downs
A: The webinar today is showing a preview of Summer 13.
Audience Question:
Q: are there different versions of developer console. The layout of my console is very different... It is a tab layout versus drop down and I don't think I can access al l the menu items in the drop downs
A: Josh is showing some new in-development features (safe harbor), that is why his view looks different than yours.
Audience Question:
Q: BTW, IMO Test Run should be listed latest first by default.
A: Thanks.
Audience Question:
Q: Not using Checkpoints from the IDE is probably just as well since I find the time it takes to load up the results and logs after a test to be magnitudes greater than running from the browser.
A: Good to hear. Thanks.
Audience Question:
Q: These are really nice features. I hope to get those soon! :-)
A: Me too!
Audience Question:
Q: Where is the Perspectives button in the current developer console?
A: The closest thing today is a "Workspace".
Audience Question:
Q: Stability issues - I think this is a longer running problem I tried to use console ever since it is out and hit this issues every time very quickly. I like the console but we need it working fast. I hope this new release makes this better. Thanks!
A: Sorry to hear that Jochen - we are working hard on improving the developer experience.
Tony Tonev (to All - Entire Audience): Looking for more resourcs on the Developer Console? http://wiki.developerforce.com/page/Developer_Console
Audience Question:
Q: will test over webservices will be covered in this webinar?
A: There are a number of places to learn about testing Apex that makes call-outs. Please check developerforce and learn about the HTTPMock class.
Tony Tonev (to All - Entire Audience): Please complete our survey: http://bit.ly/devconsolesurvey
Tony Tonev (to All - Entire Audience): Mobile CodeTalk
http://bit.ly/mobilect-dc
Tony Tonev (to All - Entire Audience): Agile Development with Heroku
http://bit.ly/agileher-dc
Tony Tonev (to All - Entire Audience): Inside the Force.com Query Optimizer
http://bit.ly/query-dc
Audience Question:
Q: Can I do a Heap Dump/Checkpoint for other users (i.e. my code worked for me, but not for someone else)?
A: Yes. As long as you have monitoring or system logs set up for that user, you should see the checkpoint
Audience Question:
Q: Will it be possible to develop the VF pages in Developer Console?
A: Yes, I do it all the time. But, no checkpoints...
Audience Question:
Q: our app is so big that the log is often full way before we get to the point we need to trace - any tips on efficiently enabling logs at a certain point?
A: I would suggest turning down logging to minimal and then overriding specific classes and code to have higher logging on specific blocks of code.
Audience Question:
Q: our app is so big that the log is often full way before we get to the point we need to trace - any tips on efficiently enabling logs at a certain point?
A: You can override log levels on a class/trigger basis. Check out Setup->Develop->Apex Classes->(your class) to do that.
Audience Question:
Q: How much of what you showed can I do from the existing console? Checkpoints?
A: Checkpoints do exist in the current console.