A method for determining a current density distribution in a microelectronic device comprising a first and a second electrode (1,2), and a layer of a 2-dimensional conductive material extending between the first and second electrode, the method comprising the following steps, performed while the device is in operation, i.e. while a bias voltage is applied between the electrodes (1,2), so that charge carriers flow in the 2D material, from the first to the second electrode or vice versa, and wherein at the interfaces between the 2D material and the electrodes, the current density vector J is essentially normal to said interfaces, - measuring the total current through the first and second electrode (1,2), when no measurement probe is placed on the 2D material, - placing a first current measurement probe on the 2D material, as close as possible to the first electrode, in a plurality of first locations (P 1i) along the interface between the first electrode and the 2D material, wherein the first probe is coupled to the same voltage as the first electrode, and wherein the first probe is configured in each of said first locations to locally shunt the current through the first electrode, - determining the currents through the first probe at said first locations, and deriving therefrom a first set of current density values which represent a boundary condition of the current density vector in the 2D material, at the interface between the first electrode and the 2D material, - placing a second current measurement probe, which may or may not be the same as the first probe, on the 2D material, as close as possible to the second electrode, in a plurality of second locations along the interface between the second electrode and the 2D material, wherein the second probe is coupled to the same voltage as the second electrode, and wherein the second probe is configured in each of said second locations to locally shunt the current through the second electrode, - determining the currents through the second probe at said second locations and deriving therefrom a second set of current density values which represent the boundary condition of the current density in the 2D material, at the interface between the second electrode and the 2D material, - solving the equation ∇. J = 0 taking into account said boundary conditions, to thereby obtain a current density distribution in the 2D material. - measuring the total current through the first and second electrode (1,2), when no measurement probe is placed on the 2D material, - placing a first current measurement probe on the 2D material, as close as possible to the first electrode, in a plurality of first locations (P 1i) along the interface between the first electrode and the 2D material, wherein the first probe is coupled to the same voltage as the first electrode, and wherein the first probe is configured in each of said first locations to locally shunt the current through the first electrode, - determining the currents through the first probe at said first locations, and deriving therefrom a first set of current density values which represent a boundary condition of the current density vector in the 2D material, at the interface between the first electrode and the 2D material, - placing a second current measurement probe, which may or may not be the same as the first probe, on the 2D material, as close as possible to the second electrode, in a plurality of second locations along the interface between the second electrode and the 2D material, wherein the second probe is coupled to the same voltage as the second electrode, and wherein the second probe is configured in each of said second locations to locally shunt the current through the second electrode, - determining the currents through the second probe at said second locations and deriving therefrom a second set of current density values which represent the boundary condition of the current density in the 2D material, at the interface between the second electrode and the 2D material, - solving the equation ∇. J = 0 taking into account said boundary conditions, to thereby obtain a current density distribution in the 2D material.