Global variables and sessions in Developer Studio - eclipse

Now it starts a session for each file you run. Is there any way to run two files using the same session (and the same global variables) in Eclipse Progress Developer Studio 3.7 (without one file running the other)?
Yes I know global variables should be avoided but that's not the topic.

You can start the Procedure Editor from Developer Studio by clicking the highlighted button.
The Procedure Editor will contain the currently active file from Eclipse. It is running in the progress process from Developer Studio that is used for compilation of the current project. So all files you start this way will be executed using the same process (as long as you do not restart the OpenEdge AVM).
In the Procedure Editor just hit F2 to execute the file. Note that this will only work for procedure files, not for classes.

There is an option in the run configuration to use the project avm instead of starting a new one.
That way subsequent runs will be in the same session.
You'll need to restart the avm to get rid of the context created by those runs

Only if you run it from the char or GUI client, and then it would still be:
run prog1.p.
run prog2.p.
so there's now way to do this w/out having a "stub" program which runs the two programs in sequence.

Related

VS Code Integrated terminal does not execute commands from extensions

Ideally, the integrated VS Code terminal, depending on the context, the type of the folder and the extension, executes some commands. For example, when opening a folder containing a Python virtual environment in VS code, the environment is recognized and activated (by the python extension) by default when opening a new integrated terminal instance (situation 1). This is done by running some command similar to source /path/to/venv/bin/activate.
Or, when using the ROS extension to debug nodes, selecting "Start Debugging (F5)" uses the launch.json file to start some nodes and finally starts debugging the desired code. To do so also, there is some command that is executed (also by he ROS extension, I assume) in the integrated terminal (situation 2) to start the debugging process. In case of debugging ROS nodes, the command usually looks something like /usr/bin/env /bin/sh /tmp/someFileName.
But, unfortunately, both of the above mentioned situations fail. I believe this happens because while the extension tries to run these two commands within their respective integrated terminals, the commands do not actually get executed in either situation. Instead, these commands are printed on the top of the terminal, but the state of the terminal is unchanged (as opposed to when the commands would have been executed, in which case depending on the commands some actions are performed). Here are two images to show what I mean. Top, situation 1 and bottom, situation 2.
The fact that these two commands are printed on top of the terminal as soon as the a new terminal instance is opened tells me that the extension tries to execute them, but they do not work for some unknown reasons.
Just to be clear, both of them are run in a seperate VC Code window, they have nothing to do with each other. When I manually run both the commands in their respective terminals I do get the desired results.
Now, I am unsure exactly how to name this issue. But I think this is surely an issue with the integrated terminal, and not a problem of the extensions. I am not sure how one could reproduce this problem.
I did a clean reinstall of VS code by deleting %APPDATA%\Code and %USERPROFILE%\.vscode. Because I am using this on WSL, there is only ~/.vscode-server on the ubuntu side. I manually uninstalled all extensions on WSL but did not delete this folder, in fear of breaking something. The problem still persisted. I have also created an issue on the VS Code GitHub page with nearly the same information.
I am unsure if this is a bug or is there something wrong with my settings. Does anyone know how I could fix this? For smaller use-cases I can still manually enter the command in the terminal. But I am trying to debug a ROS application with nearly 10 different terminals opening up and I cannot be manually entering the command each time to restart the process.
Please let me know if you need any more information. Many thanks in advance.
Edit: both edits to frame the question properly.
Although not related to WSL, I dug a little deeper today as to why in my case the extension commands were not being executed or were being chopped.
I'm an iTerm2 user. iTerm2 has something called Shell Integrations, which allow iTerm to behave differently under certain circumstances, for example, adding markers to each prompt or coloring output with certain text (e.g. WARNING or ERROR)
From time to time, I also use the VSCode Integrated Terminal, which recently added support for reporting whether the previous command errored out with an indicator on the gutter of the Integrated Terminal panel using the exit code.
iTerm can do something similar but the shell integrations mess up completely the VSCode functionality and therefore I changed my .bashrc file to detect if the terminal emulator was iTerm2 or not (which can be done with the it2check utility of iTerm2) so that it only sourced the shell integrations if I was using iTerm2.
The problem is that it2check "eats" some STDIN bytes using dd, specifically, until it finds an n so that it can obtain the name of the emulator. This of course chops the commands on the STDIN until the first n and makes VSCode Extension Terminal commands unusable
The workaround I came up with is to use the value of "$TERM_PROGRAM" as means to distinguish between the different programs. The only caveat is that the value won't be passed if you're inside of a tmux session or similar, but I can live with that.
In your case, I'd check for any process that is either not passing the STDIN to the WSL process or any dot files or shell profile scripts eating up the STDIN they receive.
I suspect that the real problem is that the local process doesn't relay the STDIN contents to the WSL and as a workaround you may try to create a VSCode Integrated Terminal profile that uses SSH to connect to the WSL host so that the STDIN is preserved

Autohotkey Not Auto

Running AutoHotKey Version 3.0.06.01 with Win 10 Version 10.0.19043 Build 19043 on a System SKU LENOVO_MT_81CU_BU_idea_FM_YOGA 730-15IKB laptop.
I have read many postings about AHK not performing as expected on Win10 OS. I have followed those instructions: rebooting, uninstall/reinstall, changing UAC settings, using run as admin , checking virus software -- et al.
I am very new and have only attempted very rudimentary scripts: Send Hello World, Msgbox Hello World and the like. Those seem to work fine by simply selecting the indicated hot keys. However,
The problem: when attempting use [Run] EG.
^j:: Run Notepad.exe or ; an executable
^1:: Run C:\HamSphere\UnaMas.xlsm ; a file
I must
1. select the saved file
2. right click and select run script
3. (the hotkeys icon displays in the tray)
4. then select the indicated hot keys
in order for the script to run as expected. I cannot simply select the indicated hotkeys. Compiling the file doesn't help.
Question: is this normal? If so, it seems like it defeats the purpose of hot keys.
TIA
doco
Apparently,
1. right clicking the *.ahk file and selecting the [Run Script] menu item
2. compile the script to an executable then double click that executable
will cause script to be ready and running in the background as evidenced by the green icon in the tray. This then allow use of whatever hotkeys defined in the script, to run.
The scripts will automatically end when windows closes or the user right clicks the associated image and selects [Exit] from the subsequent drop down.
Kind of a toss-up to actually going and getting the exe/file.
You don't need to compile scripts.
There are 3 main options for getting your scripts executed on start.
Startup folder.
Scheduled tasks.
"AutoHotkey.ahk": The program looks for a script file called AutoHotkey.ahk in the following locations, in this order:
The directory which contains the AutoHotkey executable.
The current user's Documents folder.
And if you don't want your file to be called AutoHotkey.ahk you could for example save it somewhere else and call it with Run from AutoHotkey.ahk.

Run a local command before starting eclipse debugging

I want to run a terminal command just before a debug configuration starts on Eclipse.
I heard about CDT launch Groups, but couldnt get around it fully. I need to just run a normal terminal command, nothing fancy.
The aim is to copy some stuff over to the execution path before actually starting the debugging.
I managed to do this via "Launch Groups" in the CDT. Creating 2 groups, one as a c/C++ Application which calls a shell script that includes the command I want to run. And then the normal debug configuration I wanted to execute.

On NetBeans, my Node.js server does not automatically restart after changes

I've been using Atom, Sublime Text and Code, and all of those would make the server restart after any changes. With Netbens it doesn't happen.
I have two different servers in my project, one for the client and other for API. Simply executing the commands in either my OS's terminal or Netbeans's terminal also doesn't make the server to restart. Tried to look for suggestions but those I found also didn't happen. The solution was to modify the start file in Properties > Run and check the only checkbox it's in there, but nothing.
What's necessary to do in Netbeans to refresh the server automatically after saving any file? And also, how to run two at the same time? Client and API.

Reloading/Recompiling/Refreshing .beam files inside a terminal

I use Eclipse and Erlide to develop in Erlang. To run the software I enter the ebin/ directory with my terminal since I don't like the console Eclipse provides. However after each change I have to exit and re-enter erl in the terminal to reload the .beam files that have been changed. Eclipse automatically generates new .beam files into the ebin/ directory after every save.
I know I can manually compile it with the c(filename) command, but that would require me to move to the src/ directory, compile the files, and move them back to the ebin/ directory. This requires a lot more work that just exiting and entering the Erlang terminal.
I have heard of makefiles, but I don't know if they can be ran from within an Erlang terminal.
The reason I don't want to exit the terminal is because I will lose my history of previous commands. If I'm using modules:methods with long names this takes a lot of typing time for each change made.
Is there any method to reload the .beam files in the current directory while in an Erlang terminal? Or is there any way to load the previous command history of the Erlang terminal?
You can use the l(Module). command in the shell which loads, or reloads, a module from the current directory into Erlang.
I would suggest something like active or sync but straightforward approach with c/1, l/1 and nl/1 works too
[edited]
Run your application from eclipse and check the node name, the default is #. Shut that down.
Start a separate erlang node with the same name. Now when running the application from eclipse that node will get used and you can use the shell in the terminal, while erlide will be able to reload beam code automatically when saving files.