openfl / lime-vscode-extension

Visual Studio Code extension for OpenFL and Lime projects written in Haxe
https://marketplace.visualstudio.com/items?itemName=openfl.lime-vscode-extension
MIT License
27 stars 4 forks source link

Change the default build config to debug #19

Closed Gama11 closed 7 years ago

Gama11 commented 7 years ago

This seems like a more sensible default.

jgranick commented 7 years ago

We use release as the default build configuration, as debug can have poor performance :confused:

Gama11 commented 7 years ago

Hm.. that's pretty bad for Flixel projects, because the splash screen will be enabled in release mode - you want that to be disabled during development. Also, you want flixel's debugger overlay to be active. The assumption with Flixel is really that you only use release mode for releases and are in debug mode otherwise / during development.

Gama11 commented 7 years ago

Could we detect Flixel (through lime display) and change the default to Debug in that case?

jgranick commented 7 years ago

Would it be possible to disable the splash screen unless you do a -final build?

Debug is generally used for finding the cause of issues, where performance is not a concern. Release is used for everyday testing where you do care about performance and build times, final is used for production where performance matters, but build times can be long.

Gama11 commented 7 years ago

Release is used for everyday testing

That might be true for OpenFL, but not for with Flixel. It's not just about the splash screen, but also about Flixel's debugger overlay, which is usually used quite frequently.

ibilon commented 7 years ago

That might be true for OpenFL, but not for with Flixel. It's not just about the splash screen, but also about Flixel's debugger overlay, which is usually used quite frequently.

Same for haxepunk.

Personally I use #if debug to skip the main menu and stuff like that. Never did a final build, which besides html5 doesn't make sense IIRC.

jgranick commented 7 years ago

The names used may seem disagreeable (debug, release, final) but I think that the classification is important

  1. A build configuration that may have slow runtime performance, but helps you diagnose errors
  2. A build configuration that balances runtime performance with build performance
  3. A build configuration designed for ideal runtime performance meant for production

Perhaps we can support "lime.defaultConfiguration" as a property that the user can change?

Gama11 commented 7 years ago

Perhaps we can support "lime.defaultConfiguration"

I don't think that helps. It's all about the default value. If you have to take steps to change the default, it's already not really worth it anymore (if the user knows about this setting, he may as well just switch the build config to debug).

jgranick commented 7 years ago

I meant this in global settings, so that by default, your new projects will use this setting

Gama11 commented 7 years ago

Hm... That would help, to some degree. Except for people who are new to Flixel or the Lime VSCode extension.

ibilon commented 7 years ago

I think we'll see a lot of "It crashed but I didn't get any useful information, why?" with release as default. And the answer will be "You need to switch to debug, redo a full compilation, manage to reproduce and then you'll have them".

Besides I don't remember the debug builds being that slow.

jgranick commented 7 years ago

It depends upon the platform, but some debug builds are VERY, VERY slow. iOS is a good example

Lime uses release as the default build configuration, lime test windows. You need to opt-in to use another build configuration (lime test windows -debug, lime test windows -final).