How to show the console window?
Muhamad Eawedat last edited by
How can I show the console dialog?
What kind of “console” are you referring to?
Muhamad Eawedat last edited by Muhamad Eawedat
the output console
like getting the output “Hello World!” from c program when using print command instead of getting it in the cmd
Well, Notepad++ has no native concept of such a console, but the NppExec plugin can give you that–are you using that? If so, there’s a console showing toggle in that plugin’s menu…
You need to be more specific. There are multiple items in Notepad++ called a “console”, depending on which plugins you have installed, and there are other windows that are also likely to be called a “console” by a user, even if it’s not labeled a “console” in NPP.
Show Console Dialog⇒ this brings up the “Console” window that NppExec uses to display its input (and capture its output). Given that it uses the phrase
Show Console Dialog, which matches your query, I am guessing this is the one you really wanted.
- Also available by hitting the toolbar button that looks like
- To get a program’s output to show up in this dialog, either run the command (or script) using
Execute, or type the command or script into the bottom of the Console window.
Help/*entries will provide various help, as will typing
helpin the NppExec console window.
Show Console Window⇒ this brings up a PythonScript Console window, which is separate from the NppExec console window
Run> command name ⇒ depending on what command is run, this may bring up a
cmd.exewindow with the output (and STDIN input) for your program. Many people call this a “console” window
Open Containing Folder>
cmd⇒ this will open a
cmd.exewindow in the directory of the current file, from which you could run a command, so it could be considered a console window, as well.
I hope one of these gives you what you’re looking for. (I am guessing the first one is what you were thinking of)
Muhamad Eawedat last edited by
I’m sure there are other “console” windows as well, but one that I see missing from Peter’s reply is the Luascript console:
“Plugins” menu -> “LuaScript” -> “Show Console”
Obviously to see/access that one you need to have Luascript installed! :-)
Satyaki Basu last edited by Satyaki Basu
I have installed the plugin NppExec and added the scripts ‘Java-Compile’ and ‘Java-run’ in the macro. But while compiling a java program, I am getting error:
“CreateProcess() failed with error code 2:
The system cannot find the file specified.”
Claudia Frank last edited by
as the error message said, it can’t find the program you want to execute.
Do you have jdk\jre installed? It is not part of npp.
If you have already installed how did you call it?
Ben Woodfield last edited by
I know what you mean and I am trying to do the same.
To other posts I think they mean this:
A typical meaning for a console window in programing is a small window that looks and acts like a command terminal / DOS / Bash etc etc.
So it is a text output showing the detailed output and happenings of your code. The problem is this: In other editors like Geany for example you can run code from the editor depending on the languages preferences, but in that situation a console window is helpful, it will show things like error messages.
I am new to Notepad++ so I don’t know yet if you canactually run code with plugins, but if you can you almost definitely will want a console window to give you info about the program behind the scenes.
I would look for a plugin that allows you to run the code in the specific language, some may also require compilers plugins too. Once you can run code then you will probably require another plugin for a console window - if such a thing exists :)
And did you not read the entire thread? My post from last year was pretty explicit about how to get a variety of console windows, and even made a reasonable guess as to the one that would best suit the OP’s needs… which happens to be the one that would best suit the needs you described as well.
For running external compilers and running the resulting executables, the most common plugin is the NppExec plugin, which has a console window which shows the results (like error messages). NppExec can run any external program, and you can save scripts that get stored in NppExec that you can run at will. You can also run the external commands directly from NppExec’s console window. It uses its own shell syntax, or inside its shell, you can run an instance of
cmd.exeif you’d prefer using the standard windows batch syntax. This will work for compiling and running executables from any compiled language I’ve dealt with, and you shouldn’t need a plugin per language.
(I tried to edit my post, but it took me too long. So pretend this is appended to the end of my post.)
For example, I use
npp_save cd "$(CURRENT_DIRECTORY)" g++ "$(FILE_NAME)" -o "$(NAME_PART)" npp_run cmd.exe /k "$(NAME_PART)"
to save, compile, and run a simple c++ program. All outputs end up in the NppExec’s console window.
We weren’t trying to evade the original question a year ago. We were trying to clarify, to make sure we gave the best possible answer for the OP’s situation. I chose to do it by giving a bunch of information, and hoping it would be enough to answer the OP’s question… and if not, to give the OP more knowledge, to make it easier to clarify the actual needs.
If your post had been the OP, I would have skipped the mention of the PythonScript plugin (also – I should have been more clear; the PythonScript plugin uses a python interpreter to manipulate the Notepad++ GUI and scintilla editor components that NPP uses internally for doing the text editing; for running arbitrary Python code, I would use the NppExec plugin as well). Given your description, NppExec’s console window is the one that made the most sense – though the two methods of bringing up a separate
cmd.exe, starting from within Notepad++, would also probably do what you want, though not as well integrated into Notepad++.