F12/devtools like JavaScript in browsers
Using an external IDE for Blender dev.
In this example, I am going to show you my setup using VSCode on Win 10. You can use any other IDE you want and it should also work on Mac and Linux too (I never tested).
Install Python and put Blender in your environment variables
I won't explain these steps as you can find great and easy tutorials on internet. Also, you can skip this part if you already did this.
You need to install Python in order code for Blender and you need to put Blender in your environment variables in order to launch it directly from your IDE (we'll see that later).
Create an addons directory
On your computer, wherever you want, simply create a directory called srcipts and a sub-directory inside called addons.
In my case, my directories are D:\Dev\Blender\scripts\addons

Your script or addon folder will be here as shown on the image. Using a folder to organize your addon is a good practice as you will be able to add sub-folders for libraries, icons and so on.
Specify the Scripts folder on Blender
Open the User Preferences on Blender via File menu or using Ctrl Alt U.
Under File tab, complete the Scripts path in order to point to the scripts folder we just created before (do not point to addons, just to scripts).
Save the User Preferences and close blender.

Open VSCode, start to code and launch Blender
Create your code inside VSCode. In this example, I created a simple script my_script.py called My Hello Addon that prints &quot;Hello World!&quot; when activated using the Operator my_script.hello.

bl_info = {
    &quot;name&quot;: &quot;My Hello Addon&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;author&quot;: &quot;Yann Masoch&quot;,
    &quot;version&quot;: (0, 0, 1),
    &quot;blender&quot;: (2, 78, 0),
    &quot;location&quot;: &quot;3D View &gt; Tools&quot;,
    &quot;warning&quot;: &quot;&quot;, # used for warning icon and text in addons panel
    &quot;wiki_url&quot;: &quot;&quot;,
    &quot;tracker_url&quot;: &quot;&quot;,
    &quot;category&quot;: &quot;Object&quot;,
}

import bpy

class MyHelloClass(bpy.types.Operator):
    bl_idname = &quot;my_script.hello&quot;
    bl_label = &quot;My Hello Script&quot;
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        print(&quot;Hello world!&quot;) # Replace this line by your own code
        return {'FINISHED'}

def register():
    bpy.utils.register_class(MyHelloClass)

def unregister():
    bpy.utils.unregister_class(MyHelloClass)

if __name__ == &quot;__main__&quot;:
    register()

Now, simply type blender or blender.exe in the terminal to launch Blender.
Activate the addon
At the first start, you have to activate the addon. Open the User Preferences on Blender via File menu or using Ctrl Alt U.
Under Add-ons tab, search for our addon My Hello Addon and make it active by checking the box.
Save the User Preferences.
You don't need to do this step every time. Once the addon is registered/activated, this step become optional!

Launch the script
Now, you just have to launch the script we registered as an operator by pressing Space and searching for its name.

On VSCode, Hello World will appear in the terminal section.

The terminal section will show all the outputs from Blender and/or Python to help you to debug your code.
In my code, I decided to register the class as an operator (search via Space) but you can launch it from a button, a menu or more. You will find addon examples or tutorials on internet.
Reload your code with F8
Every time you change your code, save it on VSCode and press F8 on Blender. It will reload all the Blender addons such as when Blender is starting.
That's it!
It looks a bit complicated and long but not really. Most of the steps have to be done only once. If your setup is done, you just need to open Blender from VSCode, update your code and press F8.