running SWF from the command line and getting trace output to the console - flex4

On windows 7, I installed Flash Builder 4.7 and got the Flex SDK with it (4.9.1, I think). I'm now compiling .as files on the command line. I'm running the resulting SWF files with FlashPlayerDebugger.exe (that came with my trial of Flash Builder 4.7). I'd like to see trace() output on the cmd.exe window, but I don't know how. If I should be using a different way to run the SWF files (perhaps sending them to a browser?) let me know.

You can use the command line debugger, fdb to see console output.
First, compile a debug SWF:
mxmlc -debug=true myApp.mxml
Then launch the debugger:
java -jar ../lib/fdb.jar
Then you can either launch your app in the standalone Flash Player or in a browser. When you see the (fdb) prompt, use the run debugger command to start your app. You have several choices:
run <path to SWF> (launch SWF in the standalone Flash Player)
run <url to SWF> or run <path to HTML file that embeds SWF> (launch in browser)

Related

Flutter .exe Release not running on Windows

When I build flutter for windows with flutter build windows it generates a .exe file with its .dll files etc. However, running that file (.exe) gives me a white screen and my app is not running normally.
Running flutter run --release -d windows however builds my app normally and I can use it.
What is wrong here that running the .exe file is not starting my app properly?
This is my release folder structure when running flutter build windows:
Running the .exe file:
I was using sqflite_common_ffi on Windows and this was causing the issue. Initializing it was only valid for debug thus I had to add the sqlite3.dll to the release build folder. Then it worked fine like before when starting the .exe file.
Detailed description can be found here: https://github.com/tekartik/sqflite/issues/574

Run termbox-go app in GoLand's console

I want to create a Go app with a console UI using the termui library (which is built on top of the termbox-go library). I can build the app and run it from the command line, but it will not start inside the GoLand IDE (2018.1.3) on Windows 10.
It fails during the termbox-go init when calling syscall.Syscall with SetConsoleScreenBufferSize parameter. The size for the screen buffer is 80x25. Error message is just "The parameter is incorrect."
How can I debug a termbox-go app in the GoLand or other IDE?
I think the way to solve this is to build your executable with Go 1.10 or newer, compile it with the following flags: -gcflags="all=-N -l" (these are very important and will allow the debugger to work a lot better, and then use the Run | Attach to Local Process... option from GoLand and attach to the local process.
I'll see if I can replicate the bug and update this accordingly.

Packaged Electron app (.exe) crashes silently, runs fine via command line

Running my Electron app via command-line works fine, but when I double-click the .exe of the packaged app, nothing happens other than my cursor doing a quick "busy" animation. I assume my app is silently crashing.
Is there a way I can get an error message or a crash report from the .exe to help me see what's going on?
From the root of my app directory, both these methods result in my app running fine:
node_modules\.bin\electron.cmd .
electron-packager .
node_modules\.bin\electron.cmd my_app-win32-x64\resources\app
Environment
OS: Windows 10 Anniversary x64
Node: 4.3.1
Npm: 1.14.12
Local electron: 1.4.3
Local and Global electron-packager: 8.1.0
electron-rebuild (for native module "serialport"): 1.2.1
This was not an Electron problem. This was my app trying to access a path relative to process.cwd(), which, when double-clicking the .exe file in the output folder, was not the expected one.
I was able to debug this by running the .exe from the command line, instead of double-clicking the .exe:
my_app-win32-x64\my_app.exe
This causes console.log() output to be visible in the command prompt, which allowed me to finally see the exception that was occurring.
One way to debug such issues is to open a terminal or cmd and drag the exe to it or launch the exe from the terminal or cmd. this will print any uncaught error the app might be throwing.
This can be an issue with paths if you're spawning sub processes - you can use https://github.com/jonluca/node-fix-path to fix the paths on linux and macos

force TideSDK debug console window to stay open on windows

I'm trying to debug a HTML5/javascript application that uses the TideSDK (1.2.0RC4). I can run the build script and create an executable and start it with <appname>.exe --debug. The executable starts and opens a separate console window with log output, than exits with an error code and closes the console window. I've got no idea what went wrong because I can't see the log output. How do I force the window that contains the log output to stay open? I dimly remembered cmd /k ... but that doesn't work. Anyone any pointers?
Checkout TideSDK 1.3.1-beta available for download at http://tidesdk.org
The earlier version is not supported.

How to get the output of an OS X application on the console, or to a file?

I am writing a Cocoa application with Mono embedded. I want to run and see my debug output in Terminal. On the Cocoa side I am using NSLog(), and on the Mono side I am using Debug.Write(). I can see my debug output in Xcode's console, but not in Terminal. This is what I tried:
$: open /path/build/Debug/MyProgram.app
$: open /path/build/Debug/MyProgram.app > output
$: open /path/build/Debug/MyProgram.app 2> output
in a terminal but I do not my output on the console or in 'ouput'.
What's the correct command?
PS. My ultimate goal is to write a vim plugin to manage, build, run, debug the xcode project. You can save me this hassle if you can get this vi input manager to work with xcode.
Chris gave a good overview of how the Console works, but to specifically answer your question: If you want to see the results directly in your Terminal, you need to run the built product as a child of the Terminal, which means using something like
/path/debug/build/MyProgram.app/Contents/MacOS/MyProgram
to launch the app.
Terminal on Mac OS X is just another application. Opening a terminal window for text I/O is not an inherent capability of every application as it is on Windows.
Furthermore, open /path/to/MyApp.app does not execute MyApp.app as a subprocess of your shell, it sends a message to the operating system's launch infrastructure asking it to execute the application in a normal fashion, the same as if it were double-clicked in the Finder or clicked in the Dock. That's why you're not able to just redirect its output to see what your app is sending to stdout or stderr.
You can use Console.app to see the output of applications launched in the normal manner, because the launch infrastructure specifically sends their stdout and stderr there. You can also use the asl routines to query the log, or perform more sophisticated logging if you so desire.
Open Console.app in /Applications/Utilities. All NSLog output will be printed in the System log.
Or, if you run it from within Xcode, all of the output will be printed in the Debug console.
I'm not on my Mac right now and don't recall the command sequence or the menu the Debug Console is in, possibly the Build menu?
Overview
The idea is to simply run the app from command line using ios-deploy.
Instructions
Install ios-deploy
Run the app from xcode (make sure it runs successfully)
go to xcode menu > preferences > locations and click on arrow in derived data:
in the derived data directory, search for your .app file under Build/intermediates/Products
in the terminal type the following
ios-deploy --debug --bundle
then drag the .app file from step 4 unto the terminal.. you should have something like this
ios-deploy --debug --bundle path/to/your/applicationName.app
and that's it! The app should successfully run and all the logs will go to your terminal.

Resources