elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Estamos en la red social de Mastodon


  Mostrar Temas
Páginas: [1]
1  Programación / Java / Necesito configurar Sublime Text 2 para hacer debug de Java! en: 5 Marzo 2015, 20:55 pm
Buenas tardes, estoy iniciando la programación en Java (apuntando a Android, se que existe Android Studio!) paro lo cual estoy usando Sublime Text 2.

Quisiera hacer seguimiento de las variables para ir viendo los cambios a medida que se ejecuta las aplicaciones de práctica y googleando encontré  JDebug - A Java Debugging plugin for Sublime Text http://blog.jdebugger.com/2015/02/jdebug-java-debugging-plugin-for.html.

Una vez instalado me pide configurar (JDebug.sublime-setting) y es allí donde entiendo cómo se debe hacer correctamente.
Agradecería si alguien puede darme un ejemplo de configuración: a continuación la opción de configuración recomendada y luego está el ejemplo de archivo que debe llevar la configuración.
Saludos!



Setting up JDebug

Setting up JDebug is very simple as it has only few settings to start with. You can copy and paste the default settings into user settings and update the following settings based on your environment.

workingdir-     You need to set your current project directory like c:/worksapce/TestService (Windows) or /home/user/abc/workspace/TestService (Linux or Ubuntu)
commandline -     Set the jdb command with arguments. If JDK/bin is not in your environment PATH then you need to specify full path to the jdb command. Also change the hostname and port in which the java application service is running and listening.
sourcepath -     The path to the source file with in the project. For ant project it usually /src/ and for maven usually /src/main/java.



Archivo de configuración JDebug.sublime-setting:

{
    "workingdir": "C:/Workspace/TestService",
    "commandline": "jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8849",
    "source_path_prefix": "/src/",

    "push_pop_layout": true,
    "close_views": true,
    "debug": false,

    "layout":
    {
        "cols": [0.0, 1.0],
        "rows": [0.0, 0.75, 1.0],
        "cells":
        [ // c1 r1 c2 r2
            [0, 0, 1, 1], // -> (0.00, 0.00), (1.00, 0.75)
            [0, 1, 1, 2]  // -> (0.00, 0.75), (1.00, 1.00)
        ]
    },

    "breakpoint_scope": "keyword.jdb",
    "breakpoint_icon": "circle",
    "position_scope": "entity.name.class",
    "position_icon": "bookmark",
    "changed_variable_scope": "entity.name.class",
    "changed_variable_icon": "",

    "file_group": 0,
    "console_group": 1,
    "console_open": true,
    "variables_group": 1,
    "variables_open": true,
    "breakpoints_group": 1,
    "breakpoints_open": true

}
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines