Welcome to Kap Lab Store

KapDebug Project

Presentation

KapDebug project is the collection of all Flex projects that make the following products:

  • KapInspect and its plugins
  • PureMVCConsole
  • CairngormConsole
  • ParsleyConsole

KapDebug has been developed by KapLab team, binaries and documentations are still available through KapLab website (see links below) These libraries are dedicated to helping debugging, optimizing and understanding applications made in Flex and also with different MVC frameworks. We are now glad to release it as an open source project so that community will be able to contribute and help in developing and improving it...maybe !

Official releases of KapDebug components and libraries

A bit of history

KapInspect is born in 2008 during a customer project development, where it was needed because the Flex debugger could not work due to the composite AS2/AS3 nature of the project. The bases have been created in a single week-end then the product evolved rapidly during the following months. Then, with KapInspect components we created the consoles PureMVC and Cairngorm, that are based on a generic console. ParsleyConsole came much later, and has been more tricky due to the high complexity of the Parsley framework.

Open source

Although architecture and source code of KapDebug libraries are not always very good, we will now share it fully with the community, under the LGPL 2.1 licensing scheme

The source code is not very well documented, but we believe that it will be quite easy to understand for Flex developers. We hope that there will be some developers interested in helping to improve KapInspect and the consoles, as there is now more things that would need to be done than we can handle at KapLab.

Projects libraries

KapDebug is made of several libraries that are listed below:

Common Libraries for all KapDebug

Library Description Dependencies
KapITGenericSkin MX skins for KapDebug Flex components buttons.swc, compiled Flash asset
KapITComponentSkin Default skinned Flex components (MX) for all KapDebug IHM KAPITComponents.swc, compiled Flash asset
KapDebugUtils Various utilities classes None
KapDebugComponents Technical components for KapInspect and Consoles KapDebugUtils, flexlib, KapITComponentSkin
KapDebugIntrospection Introspection library, core of KapInspect, with most KapInspect reusable components (such as DebugTree) KapDebugUtils,KapDebugComponents,flexlib, KapITComponentSkin

KapInspect projects

Library Description Dependencies
KapInspectModuleLoader The small library that loads KI as a module KapDebugUtils
KapInspect The main KapInspect SWC, that includes KI views and classes KapDebugUtils, KapDebugIntrospection, KapDebugComponents, flexlib, FlexSpy (for styles), KapITComponentSkin
KapInspectModule The module version of KapInspect (SWF) KapInspectModuleLoader, KapInspect
KapInspectMemoryModule The memory plugin for KapInspect KapDebugUtils, KapDebugComponents
KapInspectJitrBugModule A plugin for executing AS3 code with eval() method from Tamarin project KapDebugUtils,KapDebugComponents,KapInspect,EvalES4
KapLabDemo Official demonstration application for KapInspect, running on KapLab KapITGenericSkin,KapInspect

Common libraries for all consoles

Library Description Dependencies
KapITLogger Base library for all consoles, that implements KapITUniversalConsole frow which all consoles derive KapITComponentSkin,KapDebugComponents,KapDebugUtils,KapDebugIntrospection
KapITFXPatches_3_4 Services patch library for Flex SDK 3.4 and above KapITLogger
KapITFXPatches_3_4 Services patch library for Flex SDK 3.4 and above KapITLogger 3.4
KapITFXPatches_4_0 Services patch library for Flex SDK 4_0 and above KapITLogger 4.0
KapITFXPatches_4_1 Services patch library for Flex SDK 4_1 and above KapITLogger 4.1

PureMVC console projects

Library Description Dependencies
PureMVCKapit PureMVC singlecore patches for the console KapDebugUtils,KapITLogger, PureMVC_AS3_2_0_4
PureMVCMultiCoreKapit PureMVC singlecore patches for the console KapDebugUtils,KapITLogger, PureMVC_AS3_MultiCore_1_0_5
PureMVCConsole Singlecore PureMVC console SWC KapITComponentSkin, PureMVCKapit, KapDebugUtils, KapDebugIntrospection, KapITLogger, KapITFXPatchesXXX, PureMVC_AS3_2_0_4
PureMVCConsole Multicore PureMVC console SWC KapITComponentSkin, PureMVCMultiCoreKapit, KapDebugUtils, KapDebugIntrospection, KapITLogger, KapITFXPatchesXXX, PureMVC_AS3_MultiCore_1_0_5
PureMVCConsoleDemo Official demonstration application for PureMVC Console, running on KapLab PureMVCConsole, KapITFXPatches_4_0,PureMVCKapit, KapInspect,PureMVC_AS3_2_0_4

Cairngorm console projects

Library Description Dependencies
CairngormConsole The console for Cairngorm KapITComponentSkin, KapDebugUtils, KapDebugComponents, KapDebugIntrospection, KapITLogger, Cairngorm
CairngormConsoleDemo Official demonstration application for Cairngorm Console, running on KapLab CairngormConsole, KapITFXPatches_4_0, Cairngorm

Parsley console projects

Library Description Dependencies
ParsleyConsole_2.2.2 Console for Parsley 2.2.2 KapDebugIntrospection, KapDebugComponents, KapITLogger, parsley-flex4-2.2.2, spicelib-flex-2.2.2, elastic-search
ParsleyConsole_2.3.0 Console for Parsley 2.3.0 KapDebugIntrospection, KapDebugComponents, KapITLogger, parsley-flex4-2.3.0, spicelib-flex-2.3.0, elastic-search

How to build

The projects may be build either with FlashBuilder 4, either with ANT. The repository contains project descriptions and settings for FlashBuilder4, for more convenience in importing projects. The .metadata, .settings and .plugins folders are excluded from the repository, as well as built binaries inside bin* folders. Although it is possible to downgrade projects to Flex 3, this is not recommended.

Update your Flex SDK

DataVisualization
KapInspect uses the AdvancedDataGrid component (for event logs), so you will need to have the datavisualization.swc library installed into the SDK. It is now automatically installed with the SDK 4.x, but for SDK 3.5, this is not the case. Moreover, it is very very hard to find the artifact on the Web, you have to google for one hour at least. So we provide you the direct link to download it

On this page, select ADOBE FLEX 3.5 DATA VISUALIZATION COMPONENTS FOR FLEX BUILDER and download. Once downloaded, copy the SWC into the directory frameworks/libs of your SDK.

Halo theme for Flex4 builds
In Flex 4, the default theme is now Spark, and no more Halo. However, KapDebug components still rely on Halo theme, so we provide another flex-config.xml file, named flex-config-halo.xml, that you will have to manually copy inside your sdk folders. You will find this file in the buildscripts folder, just copy it into <FLEX_HOME>/frameworks directory, and builds for SDK4 should hopefully work fine.

With FlashBuilder 4

Once your repository cloned, create a new workspace on the root folder of the cloned repository. Then, you will have to manually import already existing projects into the workspace. You will probably have to manually edit project properties, and reset some of the referred projects, because FlashBuilder has never been able to correctly restore projects dependencies upon workspace migration. If your projects do not compile, you just have to check project dependencies, remove the reference(s) that could not be loaded, add them back again and save project properties. This should be enough. All external libraries required for builds are included in the projects, so eventually everything should build fine. This way of building is made for compiling binaries targetted to Flex SDK 4.x, to build Flex3 versions, you'll have to use ant scripts described below.

With ANT scripts

The workspace contains a folder named "buildscripts" that contains all ant files that automates the builds of final releases for Flex3 and Flex 4 SDK. Every project contains two build files, always named :

  • buildflex3.xml
  • buildflex4.xml

These files refer to a main property file, stored in buildscripts/, that contains the paths to Flex SDK, amongst other things, but you SHOULD NOT modify this file, as the local paths will be different for committers. There are three property files at the moment, for various Flex SDK versions:

  • buildflex3.properties
  • buildflex4.properties
  • buildflex4_1.properties Instead, you will use command-line arguments to specify SDK build path into the FLEX_HOME property.

You will also have to give more memory to Ant if you build all projects at the same time, for example: -Xmx1024M -XX:MaxPermSize=512m

So you will define an environment variable for ant as follows: ANT_OPTS = -Xmx1024M -XX:MaxPermSize=512m

To make build easier, you may also use shell scripts provided for Windows and Unix/Linux/OSX, also located in buildscripts folder:

  • buildAllFlex[3|4].bat
  • buildAllFlex[3|4].sh

Build for Flex 3
To build all KapDebug artifacts, just proceed as follows:

  • Be sure to have Ant installed and running, with ANT tasks from Flex SDK also installed
  • Open a console or terminal window, and go into buildscripts directory
  • Type the following command ant -DFLEX_HOME = <location to Flex3 SDK home directory> -f buildAllFlex3.xml
    This will build all artifacts, that will be written in <workspace>/builds/Flex3 directory.
    You may also do a partial build for some artifacts, as build files are splitted into working units:
  • buildCommonLibsFlex[3|4].xml: libraries common to all projects
  • buildKapInspectFlex[3|4].xml: All artifacts related to KapInspect
  • buildConsoleLibsFlex[3|4].xml: All libraries used by the consoles
  • buildCairngormConsoleFlex[3|4].xml: All artifacts for CairngormConsole
  • buildPureMVCConsoleFlex[3|4].xml: All artifacts for PureMVCConsole
  • buildParsleyConsoleFlex[3|4].xml: All artifacts for ParsleyConsole

Build for Flex 4
You will proceed as for Flex 3, but you will use the buildsXXXFlex4.xml files: ant -DFLEX_HOME = <location to Flex4 SDK home directory> -f buildAllFlex4.xml

Artifacts will be created into <workspace>/builds/Flex4 directory.

Why Kap Lab?

Kap Lab exists because innovation is our passion. Enjoy our products and help us to give you the best.

Cyril Daloz
CEO Kap IT