Hi, I've just started work on quite a big pre-existing project using Typescript and Webpack for the front end and Java for the backend, and I've been trying out IDEA to see if it offers better support than Eclipse. IDEA certainly promises to work, and is tantalisingly close, except for the issue described bellow: I have created a project, told it about my TypeScript source files etc, and configured a JS debug configuration which maps 'webpack:///.' To the root of the project. I actually run sbt to bring up the backend and launch the webpack-dev-server, but anyway, webpack starts and I launch the debug session in IDEA. IDEA opens a page in Chrome and connects the debugger to it as expected, and outputs to the console.

  1. What Is Wrong With My Breakpoints In Eclipse For Mac 2017
  2. What Is Wrong With My Breakpoints In Eclipse For Mac Download
  3. What Is Wrong With My Breakpoints In Eclipse For Mac

However, if I create a breakpoint and refresh the page, it doesn't work, i.e., Chrome doesn't stop at that line. I would have thought I had set it up wrong, except for that fact that I can insert 'debugger;' statements and it works as expected: when the code reaches the statement it stops and jumps to the correct line in IDEA's debugger, and the editor is annotated, I can inspect variables and step into methods which are defined in other files and everything. Also 'console.log' messages report the right file / line, which I can click in the IDEA JS console and it take me to the right source file in the project So, I feel like source-maps must be working, and the debugger is connected. I'm just curious as to why it seems that IDEA cannot tell Chrome about it's breakpoints in this project. I have also tried the angular2-seed project and that works 100% as expected: I can set breakpoints and Chrome stops where it's supposed to.

So it's funny that it doesn't work in my project. Any suggestions?

We are using awesome-typescript-loader. It's strange because source maps do appear to be at least partially working: as I say, console.log statements are annotated with the correct source file name and line, and when I click though IDEA opens the correct TypeScript file and places the cursor at the correct place. And the 'debugger;' statement works, and once I hit that statement I can step into functions in other TypeScript files in my project, and evaluate statements as I would expect. So somehow, Chrome and IDEA are matching up the browsers execution stack and are correctly matching the line in the transpiled JS that the browser is executing with the matching line in the source TypeScript file.

If I change devtool: to something which isn't 'source-map' or 'inline-source-map', I no longer get file name and line number reported in the console. Unfortunately I can't provide the project file for you.

However, I will try stripping everything back and building it back up again, seeing if I can find a minimal breaking project which demonstrates the problem. The only other thing I can think of is that webpack is serving the JS from port 3000 while the HTML pages are being served from 10214, could this be something that is breaking it?

Particle Debugging with Eclipse Debugging Particle Photon/P1/Electron code using JTAG/SWD and Eclipse This FAQ describes how to use Eclipse, a free IDE for Windows, Mac, and Linux, along with OpenOCD, to do source-level debugging of code running on a Particle Photon, P1, or Electron. Some of the things you can do:.

Set breakpoints in code and view source. See the call stack. View variables.

Single-step through code. Install local gcc-arm toolchain. Install a gcc-arm toolchain for local building for Windows, Mac or Linux The instructions are in the. This is necessary because the cloud compilers are not configured to generate debugging builds. Connect the debugger device In this tutorial, we'll use three different debugger devices, but they all work in the same way so you can choose whatever device you prefer.

Some debuggers support SWD (Single Wire Debug) mode, JTAG mode or both to talk to the STM32 microcontroller. Particle Programmer Shield The is designed to fit the Photon. You can also use it with an Electron, with the extra pins hanging over the edge. If you need your device to be in a breadboard while you debug you can look at using one of the other interfaces. You will need to use two separate micro USB cables. One connects to the Programmer Shield to access the JTAG features, and the other connects directly to the Photon.

The Photon USB cable isn't entirely necessary because the shield can power the Photon, but since the Eclipse debug process below by default uses DFU to load the debugging code onto the Photon, it's easier if you use a direct USB connection to the Photon for that. Select computer operating system: Windows Mac Linux. Particle Programmer Shield - Mac This doesn't seem to be a problem with El Capitan and Sierra versions of Mac OS X, but you may encounter a driver conflict that makes it difficult to use the Programmer Shield on the Mac. The detailed instructions for the workaround are in the. In some cases, you may need to unload and reload the driver to get the Programmer Shield to work. This will need to be done after each reboot. Try it first without running this, as sometimes it works without it.

It may be sufficient to only do this and not the more elaborate steps listed above, as well. Sudo kextunload -bundle com.apple.driver.AppleUSBFTDI sudo kextload -bundle com.apple.driver.AppleUSBFTDI Inexpensive mini SWD device You can find inexpensive USB stick that support SWD (Serial Wire Debug) at places like Amazon and eBay for US$12 or less. They work great with the Photon, P1, and Electron, requiring only two data lines and ground.

What Is Wrong With My Breakpoints In Eclipse For Mac 2017

They are compatible with the official ST-LINK/V2, however these devices generally only support SWD. Here's an example on how to connect one brand of such an interface; verify that yours is the same before wiring. USB connector side away from you. Debug header facing you.

What Is Wrong With My Breakpoints In Eclipse For Mac Download

Chips on top. Mini SWD device - Windows In order to use a mini SWD device with OpenOCD under Windows you'll need to assign the STM32 STLink device using. You may need to select List All Devices from the Options menu to see the STLink device. Select STM32 STLink (USB ID 0483 3748). Then set the driver to libusbK.

ST-LINK/V2 USB JTAG device You can also use an. It supports both JTAG and SWD mode.

If you have a full 20-pin JTAG connector (0.1'x0.1' pitch, in 2x10 layout) on your board, that's the easiest way to connect the device. The connector is keyed so you can usually only insert it one way. You can also connect the ST-LINK/V2 using jumper wires; this is more practical for SWD as it only requires 3 or 4 pins.

ST-LINK SWD Color Pin 1 VCC Orange 3V3 4 GND Green GND 7 SWDIO Blue D7 9 SWSCK Yellow D6 Building Debug Builds Important: Make sure your software doesn't use the debugger pins: D6 and D7 for SWD, or D4, D5, D6, and D7 for JTAG. This means you can't use the D7 user LED while using the debugger. The firmware compiled through the Web IDE, Desktop IDE or CLI are don't contain debug information. You'll need a local gcc-arm toolchain to make builds that are compatible with the debugger. For debugging using JTAG/SWD you create special monolithic debug builds. They're monolithic in that they are a single file that contains the system and user firmware instead of the usual modular binaries (system parts and user part).

The disadvantage of the monolithic binaries is that they are large, maybe 480 Kbytes for a simple program that might only be 6 Kbytes normally! Whenever you switch between debug and non-debug builds, or monolithic to non-monolithic, you must add the clean option to make. In this example I created a new directory in src called 'tinkerbreak' that contains, a modified version of tinker that responds to the Particle function 'break' to break into the debugger under software control. To build manually (not using Eclipse), you'd use a command line like this, based on the directory layout in the gcc-arm installation instructions linked to above. Eclipse Base Install - Windows. Install Java 8 JDK (if necessary) You may need to install a modern Java 8 JDK (not just the JRE) in order to use Eclipse. The has a link to download the JDK, which is what you need.

Select a download from the first group, Java SE Development Kit 8u some number. It was 8u111 when I wrote this, but select the current version. I used the 64-bit Windows version, jdk-8u111-windows-x64.exe. You should use the latest version of JDK 8 for your operating system, not specifically build 111.

For this example, I selected Eclipse IDE for C/C Developers but you can choose a different one if desired. If you already have Eclipse installed, you can also just add in the packages to your existing install.

The examples here use Eclipse Neon (4.6). Install Eclipse The download is a zip file, not an installer. Select the file in your Downloads folder and right-click. Select Extract All. You will probably want to change the destination directory. I put mine in C: Program Files.

It will create the eclipse directory in that for you. Create desktop shortcut (optional) For convenience, I created a desktop shortcut icon as well. Right click on eclipse.exe and select Create Shortcut and select Yes to create it on the desktop (or drag and drop it there). Now you should be able to launch Eclipse and complete the next step of the instructions, which is common for all operating systems. Eclipse Base Install - Mac. For this example, I selected Eclipse IDE for C/C Developers but you can choose a different one if desired. If you already have Eclipse installed, you can also just add in the packages to your existing install.

The examples here use Eclipse Neon (4.6). Drag the Eclipse file to your Applications folder. Eclipse doesn't have an installer or dmg file. Also, you may be prompted to install the Legacy Java SE 6 for OS X when you first run Eclipse.

If this happens, just follow the instructions for doing so. Upgrade to Java JDK 8 if necessary However, if you install the Legacy Java SE 6, you will also need to install a more modern version of Java as well. You need to install the JDK, not the JRE, in order to use Eclipse. The has a link to download the JDK, which is what you need.

Select a download from the first group, Java SE Development Kit 8u some number. It was 8u111 when I wrote this, but select the current version. I used the 64-bit Mac version, jdk-8u111-macosx-x64.dmg. You should use the latest version of JDK 8 for your operating system, not specifically build 111.

Swap the default Mac OS X JVM Then you need to swap version 8 for the version 6 of the Mac system JVM. Eclipse Base Install - Linux While you can install Eclipse using apt-get, at the time of writing it was an old version, and all of the other platforms I'm using Eclipse Neon, so I opted for a manual install. You may need to install a modern Java 8 JDK (not just the JRE) in order to use Eclipse. The has a link to download the JDK, which is what you need. You can also use OpenJDK if you prefer. Select a download from the first group, Java SE Development Kit 8u some number.

Eclipse

It was 8u111 when I wrote this, but select the current version. I selected the Linux x64 tar.gz version, jdk-8u111-linux-x64.tar.gz.

You should use the latest version of JDK 8 for your operating system, not specifically build 111. Extract the archive and move it to a suitable location. I selected /usr/local/jdk1.8.0111. Rickk@ubuntu:/Downloads$ tar xzf jdk-8u111-linux-x64.tar.gz rickk@ubuntu:/Downloads$ sudo mv jdk1.8.0111 /usr/local/jdk8. Add this to /.profile: export JAVAHOME=/usr/local/jdk8 export PATH=$PATH:$JAVAHOME/bin You'll probably have to log out and log back in after that.

What Is Wrong With My Breakpoints In Eclipse For Mac

Check the Java version: rickk@ubuntu:$ java -version java version '1.8.0111' Java(TM) SE Runtime Environment (build 1.8.0111-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode). For this example, I selected Eclipse IDE for C/C Developers but you can choose a different one if desired. If you already have Eclipse installed, you can also just add in the packages to your existing install. The examples here use Eclipse Neon (4.6).

I downloaded the Linux 64-bit version. Install Eclipse Extract the archive and move it to a suitable location: rickk@ubuntu:/Downloads$ tar xzf eclipse-cpp-neon-1a-linux-gtk-x8664.tar.gz rickk@ubuntu:/Downloads$ sudo mv eclipse /usr/local/bin. Create a desktop shortcut (optional): rickk@ubuntu:/Downloads$ cd./Desktop/ rickk@ubuntu:/Desktop$ ln -s /usr/local/bin/eclipse/eclipse. Now you should be able to launch Eclipse and complete the next step of the instructions, which is common for all operating systems. Eclipse Install GNU ARM C/C These steps are required for Windows, Mac and Linux to use the gcc-arm compiler and GDB with the Photon and Electron.

Run Eclipse. From the Help menu select Install New Software. Click Add then Archive and select the zip file of GNU ARM Eclipse. Select the packages You will need the following:. GNU ARM C/C Cross Compiler. GNU ARM C/C OpenOCD Debugging. GNU ARM C/C STM32Fx Project Templates If you're using a different debugging hardware like the Segger J-Link, be sure to select that as well.

There are additional instructions at. Proceed through the rest of the installation steps You may get a warning for unsigned content. You should select OK and proceed with the installation. Install GNU ARM Eclipse OpenOCD - Windows There is a separate install for the operating system-specific GNU ARM Eclipse OpenOCD bits. There are further installation instructions in the. For Windows, just run the appropriate installer and accept all of the default options. Install GNU ARM Eclipse OpenOCD - Mac There is a separate install for the operating-specific GNU ARM Eclipse OpenOCD bits.

There are further installation instructions in the. For Mac, download the pkg installer and run it. You may need to go into Control Panel then Security & Privacy and use the Open Anyway button because of the unsigned content. The installation directory will be something like: /Applications/GNU ARM Eclipse/OpenOCD/0.10.0-09-dev. You can test it by connecting the debugging device to a Photon in DFU mode (DFU has debugger support regardless of what firmware is flashed). In this case, I connected a ST-LINK/V2 mini device to a Photon with SWD: os-x-10: rickk$ cd '/Applications/GNU ARM Eclipse/OpenOCD/0.10.0-29-dev/scripts' os-x-10:scripts rickk$./bin/openocd -f interface/stlink-v2.cfg -f target/stm32f2x.cfg GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.10.0-dev-00141-g09aeb96 (2015-10-28-13:32) Licensed under GNU GPL v2 For bug reports, read Info: auto-selecting first available session transport 'hlaswd'.

To override use 'transport select '. Adapter speed: 1000 kHz adapternsrstdelay: 100 Info: The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD none separate Info: Unable to match requested speed 1000 kHz, using 950 kHz Info: Unable to match requested speed 1000 kHz, using 950 kHz Info: clock speed 950 kHz Info: STLINK v2 JTAG v23 API v2 SWIM v4 VID 0x0483 PID 0x3748 Info: using stlink api v2 Info: Target voltage: 3.250331 Info: stm32f2x.cpu: hardware has 6 breakpoints, 4 watchpoints If you are using the Particle Programmer Shield, you will need to copy the configuration file.

Download and copy it into your OpenOCD installation directory, into scripts/interface/ftdi/particle-ftdi.cfg. Install GNU ARM Eclipse OpenOCD - Linux There is a separate install for the operating-specific GNU ARM Eclipse OpenOCD bits.

There are further installation instructions in the. I downloaded the Debian 64-bit version, gnuarmeclipse-openocd-debian64-0.10.0-09-dev.tgz but you should download whatever the current version is, along with 32-bit or 64-bit as appropriate. Extract the archive and move it to a suitable location. Rickk@ubuntu:$ sudo mkdir /opt/gnuarmeclipse rickk@ubuntu:$ cd /opt/gnuarmeclipse/ rickk@ubuntu:/opt/gnuarmeclipse$ sudo tar xzf /Downloads/gnuarmeclipse-openocd-debian64-0.10.0-09-dev.tgz You can test it by connecting the debugging device to a Photon in DFU mode (DFU has debugger support regardless of what firmware is flashed).

In this case, I connected a ST-LINK/V2 mini device to a Photon with SWD: rickk@ubuntu:$ /opt/gnuarmeclipse/openocd/0.10.0-09-dev/scripts rickk@ubuntu:/opt/gnuarmeclipse/openocd/0.10.0-09-dev/scripts$./bin/openocd -f interface/stlink-v2.cfg -f target/stm32f2x.cfg GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.10.0-dev-00498-gbbfb673 (2016-10-28-17:01) Licensed under GNU GPL v2 For bug reports, read Info: auto-selecting first available session transport 'hlaswd'. To override use 'transport select '. Adapter speed: 1000 kHz adapternsrstdelay: 100 Info: The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD none separate Info: Unable to match requested speed 1000 kHz, using 950 kHz Info: Unable to match requested speed 1000 kHz, using 950 kHz Info: clock speed 950 kHz Info: STLINK v2 JTAG v23 API v2 SWIM v4 VID 0x0483 PID 0x3748 Info: using stlink api v2 Info: Target voltage: 3.251357 Info: stm32f2x.cpu: hardware has 6 breakpoints, 4 watchpoints If you are using the Particle Programmer Shield, you will need to copy the configuration file. Download and copy it into your OpenOCD installation directory, into scripts/interface/ftdi/particle-ftdi.cfg. Create an Eclipse project - All Operating Systems.

From the File menu select New then Makefile Project with Existing Code. In this example, we'll create a project for the tinkerbreak code we used in the command line example. Select that and make sure Cross ARM GCC is selected. Download and save it into your project directory. It will be the same for all projects.

You will need to right click on the project name (tinkerbreak) in the Project Explorer and select Refresh for it to display in Eclipse. # Assumption: These variables will be set in the environment # $(APPDIR) # $(FIRMWARE) # $(PATH) # $(PLATFORM) # $(TARGETBIN) # Optionally set $(MAKEOPTS) for things like MODULAR=n DEBUGBUILD=y USESWDJTAG=y all: $(TARGETBIN) # Use the wildcard function explicitly, because just using a dependency on.h files will # fail if the project doesn't contain any.h files.

This will work either way. Source:= $(wildcard.cpp) $(wildcard.h) $(TARGETBIN): $(source) cd '$(FIRMWARE)/main' && make all PLATFORM=$(PLATFORM) APPDIR='$(APPDIR)' $(MAKEOPTS) clean: cd '$(FIRMWARE)/modules' && make clean all PLATFORM=$(PLATFORM) APPDIR='$(APPDIR)' $(MAKEOPTS).PHONY: all clean There must be a single tab before each of the two indented cd commands. The make will fail if there are spaces, which may happen if you copy and paste from the web page. Right click on tinkerbreak in the Project Explorer and select Properties. Most of the settings that you need to modify are located here. Select C/C Build. You should not need to change any setting on this page, but here's what it should look like:.

Select Build Variables (1) in the C/C Build preferences. Use the Add button (2) to add two new build variables.