debug nodejs with nodemon and intellij

Noticed that if I run nodemon within intellij, I would not be able to debug any more inside intellij. Not sure what reason it is. If just run the nodejs, no problem. However once I add the ‘/usr/local/bin/nodemon’ into the Node parameters of the run config, the breakpoint would not work. solution To solve this…

add google code as a remote in git for intellij

add remote for intellij I use intellij to create a local git repo. To add a new remote: 1. create a project in google code. 2. go to this link: https://code.google.com/hosting/settings. Copy the machine code.google.com login xxxxx@gmail.com password xxxxxxxxx  to the user directory’s .netrc file: ~/.netrc then change the priv for this file, could be 500/600, i…

Intellij source code config

If you have a jar which contains both source and compiled class file, you tend to not be able to navigate to the source but the compiled file every time. Or you have a source jar but the naming is convention is not strictly followed the jar-source.jar pattern. You might also not be able to…

intellij useful shortcuts

Remember these two keyboard shortcuts If all else fails remember: Double Shift: Search everywhere. And I really mean everywhere. Even settings. Cmd+Shift+A: Can’t remember a keyboard shortcut or menu entry? Start looking for it FROM HERE

intellij junit working directory

if the working directory for junit test is not properly set, the resource file might not be able to be loaded if relative path is used. By default, Intellij uses project path as working directory. However if you have sub-modules which are in the sub directories, the junit test might have problem running locally. To…

run bat from intellij

External tools The External Tools feature allows you to: add custom menu items to run external programs, scripts, .bat files, etc. parametrize custom commands with a rich set of macros, such as path to the currently opened file in the editor, project classpath, project output path, etc. assign custom shortcuts to the most frequently used…

checkin code to branch in intellij

update project with “branch URL” under VCS -> update project… OR ctrl + T.  Check the below checkbox Update/Switch to specific Url Select this check box to synchronize your local working copy with a specific repository. Specify the source repository either in the URL text box through its full Url address or in the Use Branch text box through…

Intellij auto add semi colon

There is no way to insert it automatically, you need to use the Complete Statement action (Ctrl+Shift+Enter). You also need to check that Use semicolon to terminate statements option is enabled in Settings |Code Style | JavaScript | Other tab.

maven jgoodies intellij NullPointerException

Jgoodies is a good and quick tool for build Swing application. I have no problem using it and running it inside Intellij. Also if I use Intellij’s build in way to build the Jar, no problem. However when I was trying to use maven to build this executable jar, problem comes. it looks like the…

intellij reopen list delete

Direct way: File -> Open Recent -> Clear List   Elegant way: However as far as I found, There is no way to remove individual projects from the UI. We need to find the other.xml file: On Windows 7:  C:\Users\<username>\.IntelliJIdea12\config\options\other.xml On Mac OS, the full path of this file is /Users/<username>/Library/Preferences/IntelliJIdea12/options/other.xml Then manually edit the list…

generate builder pattern code in intellij

Use: Replace Constructor with Builder Place the caret at the constructor invocation to be replaced. Open Replace Constructor with Builder dialog box by choosing Refactor | Replace Constructor with Builder on the main menu, or on the context menu of the selection. The dialog box shows the list of constructor parameters to be passed to the builder, and the…