It is a well-know fact that if $(X,\omega)$ is Kahler then about every point $x \in X$ there exists a neighbourhood $U$ and a function $K \in C^{\infty}(U,\mathbb{R})$ such that $\omega|\_U = i\partial \bar{\partial} K$. Here $K$ is called a local Kahler potential. 


My question is when does this extend globally, i.e. what conditions must be imposed on a Kahler manifold $(X,\omega)$ so that there exists a function $K \in C^{\infty}(X,\mathbb{R})$ such that $\omega = i \partial \bar{\partial} K$? Clearly being non-compact is one condition and there are certainly examples of such manifolds ($\mathbb{C}^n$ etc.). I am guessing there is some vanishing theorem on Dolbeault cohomology but cannot find it in the literature 



What is the obstruction to the existence of a global Kahler potential?
In the lines of vanishing conditions you can argue as follows. Let $U\_\alpha$ be a collection of patches such that $\omega=i\partial\bar\partial f\_\alpha$ for some $f\_\alpha\in C^{\infty}(M,\mathbb R)$. Then the collection of differences $\{f\_\alpha-f\_\beta\}$ gives you a Cech cocycle $\phi\in C^1(M,\mathcal P)$, where $\mathcal P$ is a sheaf of real pluriharmonic functions (i.e. satisfying the equation $\partial\bar\partial g=0$). You wish to show that this cocycle is zero in the cohomology group. 


Locally any pluriharmonic function is a real part of holomorphic function, so we have a short exact sequence
$$
0 \to \mathbb R\to \mathcal O\xrightarrow{Re}\mathcal P\to 0,
$$
We get LES in cohomology
$$
\dots\to H^1(M,\mathcal O)\to H^1(M,\mathcal P)\xrightarrow{\delta} H^2(M,\mathbb R)\to\dots
$$
Since $\delta([\phi])=[\omega]$, as you have mentioned, the first thing you require is $[\omega]=0$.


Now, given that $[\omega]=0$, it is enough to assume that $H^1(M,\mathcal O)=0$.


**Remark.** Note that in a non-compact case the vanishing $H^1(M,\mathcal O)=0$ is not implied by $\pi\_1(M)=1$, for example, the group $H^1(\mathbb C^2\backslash(0,0),\mathcal O)$ has infinite dimension. 


This example allows you to construct a (not necessarily positive) real closed 2-form $\gamma$, which has a local potential, but does not have global. Namely, take a representative $\alpha^{0,1}$ of a nonzero class in $H^1(\mathbb C^2\backslash(0,0),\mathcal O)$ and consider $\gamma=Re(\partial\alpha^{0,1})$ (or $Im(\partial\alpha^{0,1})$).


