In Firebug, I can type my own JavaScript in the console tab and execute it. Is there a way to type JavaScript in Chrome Developer Tools and execute it?
Go to chrome://flags/, enable the "Enable Developer Tools experiments" flag and restart Chrome (or start it with the --enable-devtools-experiments command-line flag.)
Open DevTools, go to the Settings dialog, switch to the Experiments tab.
Enable the "Snippets support" experiment, close and reopen DevTools.
Go to the Sources panel. In the left-hand navigator sidebar, switch to the Snippets tab .
Right-click in the [empty] tree in this tab, select the New context menu item.
Give the new snippet any name you like and type the snippet body.
Once done, click the Run (>) button in the status bar to execute the snippet body. You can set breakpoints in snippets and debug them as ordinary scripts.
Step 1: Open Google chrome Dev tool [ Press f12 ]
Step 2: Click on Sources tab
Step 3: On left side panel, Click on Snippets tab (may be hidden, if so click >> and it will appear)
Step 4: To create new snippet click + New snippet or right-click within the Navigator, and then select New
Step 5: Develop your code into middle pane and save it.
Step 6: To run Snippet, there are three ways
A: Ctrl + Enter
B: Click on Run button [ Into Right-side panel, Top-Left button ]
C: Right-click on the snippet filename (in the pane on the left that lists
all your snippets) and select Run.
Recent Chrome
Using Chrome 50, juste open the "Console" tab and start typing and executing your code at the bottom of the console.
Arrow up, recalls the code, ctrl-enter gives you a new line:
You can't debug Javascript, but you can execute it (including jquery) in a REPL in the chrome inspector.
Open the inspector
Click the button at the bottom left with 3 lines - its tooltip is "show console"
Type your javascript and press enter
Note you usually have to go to the Sources tab and click the "pause script execution" button for your javascript to get evaluated.
Related
I downloaded the latest version (1.75.1) of Visual Studio Code.
Enabled Command Center by setting window.commandCenter option to true.
After that I disabled Quick Open search box by right clicking and unchecking hide quick open option.
Couldn't find any direct method to turn it back on.
Just right click the "go back" or "go forward" buttons and click the entry that says "quick open" in the right click menu that pops up. That will cause the quick open input to be shown again, and if you right click again, you'll see that same entry with a check mark beside it to indicate that it is shown.
In fact, the "hide <X>" entry that appears at the top of the menu is just a shortcut to clicking the entry below it for that specific input of the command center.
The handy thing is that VS Code will prevent you from hiding all three of the "go back", "go foward", and "quick open" inputs of the command center, so you always have some part of the command center visible, and something you can right click on to get that popup menu.
I'm working in VS Code and (I think I used a wrong shortcut) the following feature appeared: When having a file opened in a tab, there appears a bar below the header of the tab and above the first line of the file. When clicking on it, a dropdown menu opens up, where one can select the other files of the current folder (see picture below). When clicking on one of them, this file is opened in a new tab.
How can i remove this menu? I already searched through my user and workspace settings, but didn't find an appropriate option.
Picture
Thanks for your answers
You have enabled VSCode's breadcrumb feature. To disable it:
Press Ctrl+Shift+P to open the command pallete.
Type "Toggle Breadcrumbs" and press enter.
Alternatively, you can disable the breadcrumbs from the settings menu:
Netbean 8: Variables Window, Watches Window, Breakpoints Window, Call Stack Window, Output Window don't auto hide after debug. How i can fix this problem. Thanks.
Click Window and choose Reset Windows from the menu.
After doing this, the debug windows should auto-hide. I recommend taking a screenshot before doing the reset in case other customizations you made are inadvertently lost.
Click on Minimize Window Group which is on top right corner of variable window or other windows. If you have maximized it then after debug you need to click on Minimize Window Group after debug.
I figured this out for the Output window.. if you open that view, you'll see an icon on the left-hand side which says "Ant Settings" when hovered over. Click that, and it will open the 'Options --> Java' dialog.
In that dialog, select the 'Always Show Output' option. Now anytime you build your project (etc) that Output view will pop up, and when you click back in the Editor it will auto-hide.
Is it possible to open the developer tools inside(attached to) a popup and not detached? I'm currently working a site with popups and need to bebug javascript and find it quite annoying to toggle between the popup and the developer tools window.
When debugging popup windows you can convert them to tabs. You can do this by right-clicking the title icon and selecting the show as tab option. Then you can open the developer console as usual.
There is a tiny button waaay down to the left of the developer tools (in the row where Inspect Element and clear console log are), it looks kinda like two rectangles overlapping... The tooltip should read "Undock into separate window"...
Is that what you meant?
-Edit- Just reread the question better... I guess that is not what you meant... :)
Open Chrome Dev Tools (Cmd + Option + I)
Open the Console tab
Paste the following, the hit enter:
setTimeout(function(){debugger;}, 5000)
Navigate to your popup and wait- in 5 seconds, the debugger will pause the page, and you can see your code!
Enjoy your debugging! 🐛
Reference from Mitch Winkel-Davis
Please press and hold the tiny button for seconds.
After that, you will find the another icon (or button) at the same location.
Please release your mouse button.
You can see a popup window of developer tools.
Just press ⌥ + cmd + I when the pop up window is in focus and dev tools will open in a new pop up window
I can't seem to find a way to have the console run (to show NSLog comments) in XCode 4. The normal method for the previous version of XCode does not work. Does anyone have an idea of how to accomplish this?
You need to click Log Navigator icon (far right in left sidebar). Then choose your Debug/Run session in left sidebar, and you will have console in editor area.
for Xcode 5:
View->Debug Area->Activate Console
shift + cmd + c
If you just want to have the log output display when you run your app then you can go into XCode4 preferences -> Alerts and click on 'Run starts' on the left hand column.
Then select 'Show Debugger' and when you run the app the NSLog output will be displayed below the editor pane.
This way you don't have to select on the 'up arrow' button at the bottom bar.
The console is no extra window anymore but it is under the texteditor area. You can set the preferences to always show this area. Go to "General" "Run Start" and activate "Show Debugger". Under "Run completes" the Debugger is set to hide again. You should deactivate that option. Now the console will remain visible.
EDIT
In the latest GM Release you can show and hide the console via a button in the toolbar. Very easy.
Here' an alternative
In Xcode 4 short cut to display and hide console is (command-shift-Y) , this will show the console and debugger below ur text edior in the same window.
You can always see the console in a different window by opening the Organiser, clicking on the Devices tab, choosing your device and selecting it's console.
Of course, this doesn't work for the simulator :(
There's two options:
Log Navigator (command-7 or view|navigators|log) and select your debug session.
"View | Show Debug Area" to view the NSLog output and interact with the debugger.
Here's a pic with both on. You wouldn't normally have both on, but I can only link one image per post! http://i.stack.imgur.com/4gG4P.png
Here's an alternative.
In XCode4 double-click your Project (Blueprint Icon).
Select the Target (Gray Icon)
Select the Build Phases (Top Center)
Add Build Phase "Run Script" (Green Plus Button, bottom right)
In the textbox below the Shell textfield replace
"Type a script or drag a script file from your workspace" with
"open ${TARGET_BUILD_DIR}/${TARGET_NAME}"
This will open a terminal window with your command-line app running in it.
This is not a great solution because XCode 4 still runs and debugs the app independently of what you're doing in the terminal window that pops up.