Build with Spket and Debug it in the Browser

Feature requests
Post Reply
crp_spaeth
Posts: 23
Joined: Sat Jul 25, 2009 6:28 pm

Build with Spket and Debug it in the Browser

Post by crp_spaeth » Mon Aug 17, 2009 9:28 pm

Hey Eric,

I am writing Extjs code with your IDE for a while now and I found my self doing the same thing again and again. I talk about the build and debug process of my Extjs classes. To keep things clean I create a new file for each class I write.

This behavior will lead you to the situation where you have to include all those little pices in a html file together to make them run.

Because I allways try to be the lazy kind of developer I took the time to think about the problem and came up with a little solution for it. Maybe you like it :)

I wrote a little aspx Server Page which tooks a parameter with the location of an javascript file in the project. The Serverpage will try to find the file the parameter is pointing to and than it scan the javascript file for all @include 's (which I allways take care of because of the code-completion). After colecting the includes a recursive procedure which takes a look into every included file and its @include's starts. After that the Serverpage got a list of all Includes and its dependencies. On those dependencies the page creates a buildorder. File by File gets than written into a new javascript file called debugbuild.js.

This is very nice because I can use the same Html file to debug all my different Classes.

My original aspx does a few things more like debug-code exclusion but the main point is the build process using the spket @includes .

I think this would be a great build-in feature for spket!!??!!

What do you think?

Best regards Martin

eric_suen
Site Admin
Posts: 678
Joined: Wed Sep 28, 2005 7:00 am
Contact:

Post by eric_suen » Tue Aug 18, 2009 2:03 am

Have you tried load javascript dynamically? like

Code: Select all

//debugbuild.js
include('aaa.js');
include('bbb.js');
Lots of ajax library has function for dynamic load javascript, in that case you don't have to generate file, and it is more easy to debug, you don't have to reset breakpoints every time...

crp_spaeth
Posts: 23
Joined: Sat Jul 25, 2009 6:28 pm

Post by crp_spaeth » Tue Aug 18, 2009 4:17 am

This is one of the options of my Server Page not to load those scripts dynamicaly but to just include all the javascripts via script tags this allows to keep aware of the breakpoints. On the other hand there is the debugger; statement which works for me as well.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest