Testing application

While testing application, in order to reflect the changes, do i need to restart the main server and then local server or do the whole ant build. In other words, run the commands in order,

cd C:/Users/rshmp/AppData/Local/Google/Cloud SDK/google-cloud-sdk/bin/java_dev_appserver.cmd --port=8888 --address=0.0.0.0 C:/MIT_appinventor-sources/appinventor-sources/appinventor/appengine/build/war
2.
ant RunLocalBuildServer

By doing this I did not see the changes. Can anyone help me with this.

Thanks
Reshma

It depends on what code you are changing.

If you are changing things that are in the web frontend only, then you can actually just leave the java_dev_appserver.cmd command running in a separate terminal since the UI changes result in new JavaScript that will be served up by the dev server. Run ant noplay to rebuild.

If you are changing backend things like fixing a bug in the server code, then you will need to restart the dev server script to reload the updated class files after compiling. Run ant noplay to rebuild.

If you are changing the buildserver, rerunning ant RunLocalBuildServer should rebuild the changed parts and relaunch the server.

If you are changing Android related code, run ant PlayApp to recompile the companion APK for installing on your device. This will also trigger a rebuild if you run ant RunLocalBuildServer since Android code changes also need to affect compiled apps.

I note that you are on Windows. Sometimes, pressing Ctrl+C to stop the dev server only stops the shell command and not the spawned child processes. Make sure there aren't any leftover Java processes using the Windows Task Manager.

1 Like